Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

layout folder name for devices 720x1280 like samsung galaxy s3

I made an app earlier which was all good, at the time of development there were only two devices in the market galaxy note and samsung nexus, now devices with resolution 720*1280 are around 30, when my app runs on these devices they go to left corner leaving the empty space behind, layout folder name were created were layout-small, layout-large, layout-normal,

As far I know xlarge is for tablets, my question is what will be the layout folder name for devices having 720*1280 resolution, and what dpi in width they have, like in normal screen the width is 320dp , what will be in hd devices.

Edit : another thing sw360dp works fine on ICS, jelly beans does not pick resources from it. :/

like image 856
Raheel Sadiq Avatar asked Oct 19 '12 06:10

Raheel Sadiq


2 Answers

Try using folder name with /layout-sw360dp/  and width 360dp

like image 108
Ali Raza Avatar answered Sep 19 '22 16:09

Ali Raza


For devices having 720 * 1280 resolution, you can use layout-sw720dp folder

More info is provided in the official documentation (see Configuration Examples)

To help you target some of your designs for different types of devices, here are some numbers for typical screen widths:

  • 320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).
  • 480dp: a tweener tablet like the Streak (480x800 mdpi).
  • 600dp: a 7” tablet (600x1024 mdpi).
  • 720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).

For other cases in which you want to further customize your UI to differentiate between sizes such as 7” and 10” tablets, you can define additional smallest width layouts:

  • res/layout/main_activity.xml # For handsets (smaller than 600dp available width)
  • res/layout-sw600dp/main_activity.xml # For 7” tablets (600dp wide and bigger)
  • res/layout-sw720dp/main_activity.xml # For 10” tablets (720dp wide and bigger)
like image 34
Renjith Avatar answered Sep 18 '22 16:09

Renjith