我有一个应用程序,我定义了所有必要的细节,现在我想让它LOCALIZED.
我知道我们必须创建value文件夹并添加字符串,其中使用相同的“key”声明其他语言的语言字符串.
我的问题是假设我的应用标题是“DASHBOARD”
西班牙语是“Tablero de instrumentos”
知道这包含更多的字母然后我们有英文,所以应用程序的对称性受到干扰.
我想要的是根据所调用的语言自定义字体大小,这样它就不会影响我的UI.
解决方法:
我认为你的解决方案就在这里:
How to adjust text font size to fit textview
根据这个主题你可以使用:
speedplane’s
FontFitTextView
, but it only decreases font size if
needed to make the text fit, and keeps its font size otherwise. It
does not increase the font size to fit height.
注意:speedplane是来自StackOverflow论坛的人.