2012-04-09 79 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/.