Android 3.2 same layout for all screens

2019-06-16 09:20发布

i set following layout configuration for my app

enter image description here

small,normal,large,xlarge screen layouts are fine for android 1.5 to 3.1. In android 3.2 all screens i.e

  • small (320 x 426 with density 160),
  • normal (320 x 470 with density 160),
  • large (480 x 640 with density 160) ,
  • xlarge (720 x 960 with density 240)

only takes layout-sw320dp . Is there any additional configuration required for android 3.2

note: i'm using eclipse with android plugin

1条回答
虎瘦雄心在
2楼-- · 2019-06-16 09:52

With the layout management changes introduced in Android 3.2 (See http://developer.android.com/sdk/android-3.2.html#api & http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html) the most specific layout should be selected for the device being used. In this case layout-sw600dp should be selected for a 720 x 960 device.

For Android 3.2, you also need to specify which screen sizes your app supports in the manifest file using the element. http://developer.android.com/guide/practices/screens_support.html#DeclaringScreenSizeSupport http://developer.android.com/guide/topics/manifest/supports-screens-element.html

This is likely causing your issue.

查看更多
登录 后发表回答