2012-04-09 73 views
-1

我试图将我的应用程序布局从Galaxy版本转换为HTC Sensation版本。 我已经根据屏幕大小创建了一个文件夹layout-540x960,但我得到这个错误:invalid resource directory name layout-540x960 它是如何解决的? 谢谢, Eyal。HTC Sensation的特殊布局目录

回答

0

你不能给布局目录任何你想要的名字。请阅读这篇文章,找出如何支持不同的屏幕尺寸:

http://developer.android.com/guide/practices/screens_support.html

The configuration qualifiers you can use to provide size-specific resources are small, normal, large, and xlarge. For example, layouts for an extra large screen should go in layout-xlarge/.

Beginning with Android 3.2 (API level 13), the above size groups are deprecated and you should instead use the swdp configuration qualifier to define the smallest available width required by your layout resources. For example, if your multi-pane tablet layout requires at least 600dp of screen width, you should place it in layout-sw600dp/.