'Font size of option in select doesn't change when I change font size of my android device
I have this form in my react-native app and when the font-size of a device is not default, the font-size of an input text and a select option looks different.
How to fix this?
Solution 1:[1]
You need to write below code in your app.tsx(Your staring application file) File inside useEffect.
useEffect(()=>{
if (Text.defaultProps == null) Text.defaultProps = {};
Text.defaultProps.allowFontScaling = false;
})
For above code if your device font setting change your app font change will not change it will remain same whatever you provide in your style
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mobile Team iOS-RN |
