【问题标题】:React Native: Design disturb after increasing Accessibility Larger SizeReact Native:增加可访问性后设计干扰更大尺寸
【发布时间】:2019-12-16 05:54:25
【问题描述】:

当用户增加可访问性大小时,FontSize 会出现问题。想要阻止设置“辅助功能”或“显示大小”。为此我尝试过

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

但无法成功。 alertTextInput 也有问题

当前反应原生版本:

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

也经历过:

  1. React Native - Disable "Screen Size" Setting

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

请帮帮我。

提前致谢。

【问题讨论】:

    标签: react-native react-native-android react-native-ios


    【解决方案1】:

    使用 TextInput 试试这个:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-11
      • 2019-05-22
      • 1970-01-01
      • 2015-07-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多