7

What are the primary buckets, or groups, of smallest width (sw) layouts that should be provided in an app?

I tried creating buckets around the most common screen widths in pixels: 240, 320, 480, 540.

Then I realized that the buckets are DP values, so a phone that is 480px wide is not (necessarily) 480dp wide. I had multiple 480px wide phones falling into my 320dp bucket and messing everything up.

So how do you handle this? Which groups do you use for choosing the right layouts in your Android phone apps?

Studio4Development
  • 725
  • 1
  • 6
  • 18

2 Answers2

3

It depends on your needs. Generally smallest width is used for adapting your layout to different screen sizes. It is more precise than "small", "normal", "large", or "xlarge", but it has been introduced from level 13.

For smartphone I usually use "small", "normal" and "large" qualifiers because a lot of such devices are still below level 13. But for tablet I use sw600dp for 7-inch devices and sw720dp for more than 10-inch tablet.

Donkey
  • 1,176
  • 11
  • 19
  • Doesn't really address the question. I understand what you're saying about most devices still being pre 4.0, but what I'm asking is, regardless of that, what are the most prevalent SW DP buckets. Now that 4.x is around, and these new layout qualifiers are around, I'd like to create buckets for various phone sizes, but that will only really work if I know where to draw the line. It doesn't make sense to do sw200dp and sw300dp if 80% of phones are sw250dp which falls smack dab in the middle. – Studio4Development Jun 26 '13 at 20:46
0

Take a look at Screen Sizes for a survey of device sizes. At first glance, 480px, 720px, and 768px appear to be the most common widths for phone displays.

Dalbergia
  • 1,699
  • 1
  • 17
  • 26