The font size of APP in Android does not change with the system

In "setting", "display" and "font size", we can set the system font size

If the font of the app interface is modified, it may not achieve the desired effect, and the interface layout will change.

Unmodified effect (test model: Nexus 5):

Normal small super large

Effect after modification (test model: Nexus 5):

Normal small super large

We can intuitively see from these two groups of comparison figures that the font size of the modified app does not change with the system change.

In fact, the implementation is very simple. There is no need to set the "textsize" in the layout file. Just override the getresources() method in the parent activity:

The above is what Xiaobian introduced to you. The font size of APP in Android does not change with the change of the system. I hope it will be helpful to you. If you have any questions, please leave me a message. Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>