In order to support different screen sizes in an Android App, I have created different layout versions: sw320, sw480 sw600 sw720
But I notice that many mobile smartphones takes the version of sw320 while they do represent the page differently.
For example when running on the following devices: Nexus One and Samsung Galaxy s7 both takes (from some reason) the sw320, Why is that?
And would it be reasnable to add more layout versions to the code?
The Nexus One was an
hdpi
device with a screen resolution of 800 x 480 pixels. Its shortest width is 480 pixels, which is 320dp.The Samsung Galaxy S7 should be an
xxxhdpi
device, and its screen resolution is 2560 x 1440. Its shortest width is 1440 pixels, which is 360dp.Hence, both devices fall within your
-sw320dp
bucket, given your other buckets.IMHO, you should have fewer versions, not more. You should be using layouts that are more fluid and can adapt to small variations in screen size. Having different layout resources entirely should be reserved for cases where a major change in UI is called for (e.g., the classic master/detail pattern implementation, between phones and tablets).