0

I have developed an app for Android and I need to run my app on different devices - especially on devices with 1280x720 and 480x800 resolutions.

Which layout folders do I have to create?

Thanks in advance.

developergg
  • 837
  • 1
  • 7
  • 12
  • 1
    http://stackoverflow.com/questions/16706076/font-size-and-images-for-different-device/16910589#16910589 http://stackoverflow.com/questions/12242111/application-skeleton-to-support-multiple-screen http://stackoverflow.com/questions/7587854/is-there-a-list-of-screen-resolutions-for-all-android-based-phones-and-tablets – M S Gadag Nov 26 '14 at 05:43

4 Answers4

1

I recently finished my App and I did not use any of the screen size qualifiers, but instead I used the screen density and smallest width qualifiers:

layout/layout-land
layout-sw480dp/layout-sw480dp-land
layout-sw6000dp/layout-sw600dp-land
layout-sw720dp/layout-sw720dp-land

I also used dimens.xml files across the same folders above and mdpi/hdpi/xhdpi/xxhdpi.

I am no expert..I am working with Android for about two months now, but this is the help I can give ;)

Bernardo
  • 531
  • 1
  • 13
  • 31
0

layout not taken based on v19 or v1 version which taken base on device resolution :

layout             // layout for normal screen size ("default")
layout-large       // layout for large screen size
layout-xlarge      // layout for extra-large screen size
layout-xlarge-land // layout for extra-large in landscape orientation

More detail Check : http://developer.android.com/guide/practices/screens_support.html

Haresh Chhelana
  • 24,720
  • 5
  • 57
  • 67
0

Layout folder like this way.

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

In Manifest add support-screens

<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:requiresSmallestWidthDp="integer"
          android:compatibleWidthLimitDp="integer"
          android:largestWidthLimitDp="integer"/>

For more info check this http://www.kandroid.org/guide/practices/screens_support.html and http://developer.android.com/guide/practices/screens_support.html

Yugesh
  • 4,030
  • 9
  • 57
  • 97
0

for 1280x720 (4.7 inch) u need to create

res/layout-xhdpi/urxml

res/drawable-xhdpi/urresorces

values-xhdpi/dimens              //add dimensions

for 480 x 800 (4. inch) u need to create

res/layout-hdpi/urxml

res/drawable-hdpi/urresorces

values-hdpi/dimens              //add dimensions

again for 480 x 800 (5.1 inch) u need to create

res/layout-large-mdpi/urxml

res/drawable-large-mdpi/urresorces

values-large-mdpi/dimens              //add dimensions

and for more info refer my comment

Links to restrict for specific devices

Restrict sales of an app by specific devices?

Android: Limit supported devices in Android Market

Community
  • 1
  • 1
M S Gadag
  • 2,057
  • 1
  • 12
  • 15