Change font size in app per user

1
Hi,  We have a native application and some users set their font size of their phone really large. The text is not readable in our app anymore, that is why we want to change this and make it possible to set the font size in our app. For example in this way:    Is it possible to get a value of an attribute saved to your database (per user) (fontSize enum: small / Normal / Large / Larger) and retrieve it in react native styling to adjust the font? Or a Non Persistable attribute.    Does somebody have a solution for this?    Thanks,  Kolien
asked
1 answers
0

Hello Kolien,

 

I could be wrong, but I think this can be accomplished using Dynamic Classes to define a style based on a given condition (an Enum, as you mentioned):

https://docs.mendix.com/refguide/common-widget-properties/#dynamicclasses

 

You can define in your main.js different styles and apply these styles as needed, depending on the condition.

To define different custom font styles, see the article:

https://vstram.medium.com/how-to-configure-custom-fonts-in-a-mendix-native-mobile-android-application-97d049ec40f4

 

answered