8

I am currently developing a React Native application, and some of our users might have slight vision problems. We wish to prevent the setting "Display Size" in Android, as this makes our app unusable.

We solved the problem with the Font Size using the simple line:

Text.defaultProps.allowFontScaling=false;

Is there a similar solution to the Display Size setting?

Thanks in advance

ExoMemphiz
  • 179
  • 1
  • 12

1 Answers1

-2

You can control using flex property in view. Use to below to the parent view and adjust the flex value from 0.1 to 1 to adjust the view. below is the example for 70% of the screen size.

<View style={{ flex : 0.7 }}>

</View>
Praz Solver
  • 513
  • 3
  • 12
  • If you want to adjust horizontally use flexDirection : 'row' property additionally – Praz Solver Jun 08 '18 at 12:19
  • 3
    This doesn't help at all, we are already using Flex. Have you tried creating a small project using Flex, and then set the Display Size to a different setting? It completely ruins the layout, as things get mashed together. – ExoMemphiz Jun 09 '18 at 12:58