1

facing the issue for FontSize when the user increases accessibility size. wanted to prevent the setting "Accessibility" or "Display size". for that I have tried with

    if (Text.defaultProps == null) Text.defaultProps = {};
    Text.defaultProps.allowFontScaling = false

But unable to succeed. There was also issue with alert and TextInput

current react native version:

"react": "16.8.3",
"react-native": "0.59.2",

also gone through:

  1. React Native - Disable "Screen Size" Setting

  2. How to disable font scaling in React Native for IOS app?

Please help me out.

Thanks in Advance.

Yuyutsu
  • 2,509
  • 22
  • 38

1 Answers1

0

With TextInput try this :

 TextInput.defaultProps = {
      ...(TextInput.defaultProps || {}), // Tắt Scaling ở TextInput (Resize text )
      allowFontScaling: false,
    };