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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With