Using Smallest width in Android for layout design

2.2k Views Asked by At

I am developing an App and want my UI to fit as much screens as possible. I have read the Android docs about designing for different screens. Though I have a question which is: There are some phones which are 5.0 inches and some 5.5 inches, please how do I use the sw- qualifier so that 5.0 and 5.5 design can be different. Or can I get a suggestion of the most commonly used sw- qualifiers, like how we had the small, normal and large, I have seen the ones given in the docs:

320dp: a typical phone screen.

480dp: a tweener tablet like the Streak (480x800 mdpi).

600dp: a 7” tablet (600x1024 mdpi).

720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc).

So which of these should I use for a 5.5 inch screen? Is there any single dp size that all the 5.5 inch screen can adjust to, so that if I am developing for 5.5 inch I just use it?

1

There are 1 best solutions below

0
On

ild just use what's in the docs just for now, what is in the docs is below:

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)