Sunday 15 May 2011

Android Smallest Width Layouts -


What are the primary buckets or groups of smallest width (SW) layouts provided in the app?

I tried to make a bucket around the most common screen width in pixels: 240, 320, 480, 540.

Then I realized that buckets are DP values, so a phone is 480px wide (not necessarily) 480dp wide. I have 320 pixels bucket with 480 pixels wide phones and everything is messing up .

How do you handle it? Which group do you use to choose the right layout in your Android phone app?

It depends on your needs. Normally the small width is used to make your layout adapt to different screen sizes. This is more accurate than "small", "normal", "big", or "excel", but it has been started from level 13.

For Smartphones, I usually have "small", "normal" and "big" qualifiers because many such devices are still below 13. But for tablets I use sw720dp for tablets more than sw600dp for 7-inch devices and 10-inch.

No comments:

Post a Comment