当设置->显示->字体大小上的字体大小为正常"时,我的应用程序按照设计运行良好.
I have my app running well as per design when the font size is at "Normal" on Settings->Display->FontSize.
当我将字体大小更改为小/大时,整个内容都被混搭了.我的应用程序是内容密集型的,这对应用程序产生了严重影响.
When i change the font size to Small/Large entire content is mashed up. My app is content intensive and this is badly effecting the app.
可以说,操作栏标题就像隐私和设置".当字体大小在系统设置中设置为大"时,标题会超出边界/椭圆大小.列表视图内容看起来很可悲.
Lets say, action bar title is like "Privacy and Settings". The title runs off the bounds/ellipsizes when font size is set to "Large" in System Settings. The listview contents look pathetic.
有没有办法确保设置->字体中的更改不会影响我们的应用程序?
Is there a way to make sure that the change in Settings->Fonts doesn't effect our app?
Flipboard 应用可以做到这一点.
Flipboard app does that.
推荐答案我终于找到了解决方案.Google 严格建议对字体使用sp".但是,如果您不想根据用户字体设置缩放文本,请使用dp".如果您转到设置->字体,则给定设备中的字体大小不会改变.您的 UI 将保持您的设计初衷.
I finally got the solution. Google strictly recommends to use "sp" for fonts. However, if you do not want the text to be scaled based on user font settings, use "dp". The font size will not change in a given device if you go to settings->fonts. Your UI will remain just like you designed it for.
感谢 Aswin 的投入.感谢 Joseph Earl 在 Android sp 与 dp 文本 - 什么会调整比例"以及支持的理念是什么
Thanks Aswin for your inputs. And thanks to Joseph Earl for answering question at Android sp vs dp texts - what would adjust the 'scale' and what is the philosophy of support
更多推荐
如何使应用程序中的字体大小不受更改设置字体大小的影响
发布评论