[英]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. 我有问题,如果有人编辑android系统的字体大小(在设置 - >显示 - >字体大小),我的应用程序布局不再适合。 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! 谢谢!
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. 在
sp
测量的任何内容都将考虑字体缩放。
Your short-term solution will be to change those dimensions to dp
, as 1 sp
equals 1 dp
at normal font scale. 您的短期解决方案是将这些尺寸更改为
dp
,因为1 sp
等于正常字体刻度的1 dp
。
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. 话虽如此,请考虑更新您的UI以更灵活地使用字体比例,因为这对于某些用户来说非常重要,因为这些用户的愿景并不那么严重。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.