Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Override the font size of the android system settings

I've got the problem, if someone edits the font size of the android system (in Settings->Display->Font Size), my app layout doesn't fit anymore. I developed my app in normal font size.

I would like to override the font size of the systems settings just for this app.

Thanks!

like image 331
Steckdoserich Avatar asked Jan 21 '26 11:01

Steckdoserich


1 Answers

I would like to override the font size of the systems settings just for this app.

That is not strictly possible. Anything measured in sp will take the font scaling into account.

Your short-term solution will be to change those dimensions to dp, as 1 sp equals 1 dp at normal font scale.

That being said, please consider updating your UI to be more flexible about font scale, as that is important for some users, whose vision is not as acute.

like image 167
CommonsWare Avatar answered Jan 22 '26 23:01

CommonsWare



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!