Android – change font size based on language localization

I have an application, I have defined all the necessary details, and now I want it to be localized. I know we must create a value folder and add strings, in which the same "key" is used to declare language strings in other languages

My problem is to assume that the title of my application is "dashboard" and the Spanish is "tablero de instrumentos". We know that it contains more letters, and then we have English, so the symmetry of the application is disturbed. What I want is to customize the font size according to the called language, so that it will not affect my UI

resolvent:

I think your solution is here: how to adjust text font size to fit textview

According to this topic, you can use:

Note: speedplane is from stackoverflow forum

Code: fontfixtextview.java

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
分享
二维码
< <上一篇
下一篇>>