用于本地化布局的Landscape文件夹

时间:2013-01-11 13:52:52

标签: android xml eclipse layout

由于语言的不同,我需要为德语提供单独的横向布局。我怎么在eclipse中创建一个新的文件夹来保存布局,但现在我收到了一个错误。 文件夹的名称是否正确 下面是截图截图的链接

https://docs.google.com/file/d/0B9OVrUvUh2stdmhkQzNFNkcxS28/edit

2 个答案:

答案 0 :(得分:1)

要以不同语言支持不同的应用,您可以通过两种方式来实现这些目标。

:一种。最喜欢的方式

您只需添加res/values-__/string.xml个不同的string.xml

要支持德语,您只需添加包含德语字符串值的res/values-de/strings.xml Android can display to user at runtime on the basis of their locale.

B中。根据语言创建新布局时增加应用程序大小。

您需要根据developer.android.com

将文件夹名称更改为layout-de-land

答案 1 :(得分:0)

您的链接不起作用,但根据http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources,该名称应为layout-de-land

  

如果对资源目录使用多个限定符,则必须按照表中列出的顺序将它们添加到目录名中。