Reputation: 4562
I have developed an android application to work with small, medium and large screen sized devices.
But recently I came across the following issue.
When I go to the settings and change the font size to Extra Large instead of default Medium size [Settings --> Display --> Font size], my apps font size also gets increase accordingly and the layouts get mess up.
Have anyone previously experienced this and would be grateful for any Idea for a solution which will not continue this messed up situation.
Edits...
I have used the "sp" units to define all the font sizes within the application...
Upvotes: 4
Views: 4454
Reputation: 540
I had the problem myself in a widget. There is no room to let the user have any thing to say about the font size. The solution is pretty simple:
Then you get the correct scaling according to have the dpi on different screens but it wont change depending on the users selected font size.
Upvotes: 4
Reputation: 1006614
Have anyone previously experienced this
This is what sp
gives you: automatic-scaling fonts based upon the user's chosen font scale.
and would be grateful for any Idea for a solution which will not continue this messed up situation.
Ideally, you would fix your GUI implementation, so that you can accommodate changes in font scale. If the user has requested larger fonts, your app should support this. This is no different than designing a Web app that takes into account browser font size changes.
In a pinch, stop using sp
units, but then do not complain if your users complain that you do not honor their requested font scale.
For more, see this blog post of mine.
Upvotes: 6