2

I have android app, which has a lot of string resources localized for different languages (~200 strings for 10 languages). Some of them displayed on limited area. To make them fit correctly I have different text sizes for different resolutions (ldpi, hdpi, etc). But now I have a problem, that some text on different languages have different length and do not fit that area. Is there a way how can I fit all text properly, to avoid too small text on one language and to big on another? Thanks.

4

1 回答 1

2

除了为不同的语言设置不同的文本大小之外,我不知道有任何其他方式。
为此,您可以使用 dimens.xml 资源文件。在您的情况下,您可能想要创建一个名为 res/values-es/dimens.xml 的文件,并且可能还需要一个 -fr 版本。您可以在 res/values/dimens.xml(或 res/values-en/dimens.xml,如果您想更具体)中指定默认值。

于 2013-06-27T09:41:26.973 回答