0

i got to the point in the app where i need to make layout adjustments for multipule screen. these are the folders i have for layouts:
(each has a landscape version as well)
layout
layout-800x480
layout-sw600dp
layout-sw800dp

most of them work fine, the problem is with the main layout folder. when i run the app on a Galaxy S3 or Nexus 4, the device picks the 800x480 layout, altough these devices have bigger resolution. so the main layout is never picked.. if i understand correctly, a folder such as "layout-800x480" is supposed to be only for devices with the exact same resolution.. am i wrong?

4

2 回答 2

0

I believe that the only valid specifiers (resolution wise) for the folders name are:

  • Smallest screen width (ie: sw600dp)
  • Available screen width (ie: w600dp)
  • Available screen height (ie: h600dp)

So that would explain why the layout-800x480 folder is being ignored

于 2013-08-25T09:00:43.847 回答
0

Different layout folder

res/layout/my_layout.xml             // layout for normal screen size ("default")
res/layout-small/my_layout.xml       // layout for small screen size
res/layout-large/my_layout.xml       // layout for large screen size
res/layout-xlarge/my_layout.xml      // layout for extra large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation

add the following code into your manifeast file

<supports-screens android:resizeable=["true"| "false"]
          android:smallScreens=["true" | "false"]
          android:normalScreens=["true" | "false"]
          android:largeScreens=["true" | "false"]
          android:xlargeScreens=["true" | "false"]
          android:anyDensity=["true" | "false"]
          android:compatibleWidthLimitDp="integer"
          android:largestWidthLimitDp="integer"/>

for more information click here

于 2013-08-25T09:02:07.353 回答