Android Question Proper font scaling

wimpie3

Well-Known Member
Licensed User
Longtime User
Font sizes cannot be defined in %x or %y, only with fixed values. What is the best way to make them scale properly for large resolutions?
 

klaus

Expert
Licensed User
Longtime User
AutoScale in the Designer, the TextSize is automatically changed.
Otherwise you could calculate them according to the screen size.
If you have a screen size of 12 for a screen of 5'' and size the views in %x and %y you can calculate:
TextSize = 12 / 5 * CurrentScreenSize.
 
Upvote 0

wimpie3

Well-Known Member
Licensed User
Longtime User
Not using the designer so I'll have to calculate the size myself. Would be interesting to know the calculation used by the desigber
 
Upvote 0
Top