How do I prevent Android device Display size scaling in my app?
问题 I'm developing an app with React Native for both iOS and Android, and I am trying to prevent device-specific scaling of the display in the app. For text/font size scaling, putting the following code in the root-level App.js file solves the issue for both iOS and Android: if (Text.defaultProps == null) { Text.defaultProps = {}; } Text.defaultProps.allowFontScaling = false; However, Android devices have the following Display size setting that is still being applied: I've tried (unsuccessfully)