I have read this tutorial SUPPORTING MULTIPLE SCREENS several times and many stackoverflow questions regarding Design Android UIs to fit well with all android screen s
If it is very important to specify to that extreme, there is a handy tool for folder naming, and that is chaining. Ex. layout-w480dp-normal
and that would be screen sizes at least 480dp
in width, and fall under the normal
category. Note: I didn't get the need to develop for such detailed requirements, but according to the linked source, it should work just fine.
Source
Make sure to follow these rules
Create different layouts for different screen.
res/layout-large/
res/layout-sw600dp/
ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi
Find android UI design examples and tutorials: http://www.viralandroid.com/2015/11/android-user-interface-ui-design-tutorial.html
Generalized densities.
A set of six generalized densities:
ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi
Just Define folder for different image like:
drawable-large-xhdpi: copy (drawable-xxhdpi images)
drawable-xlarge-xhdpi: copy (drawable-xxxhdpi images)
drawable-xxhdpi: 1080x1920 slicing
drawable-xxxhdpi : 1440x25601 slicing
Add support multiple screen size support in manifest.
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
You can use the following resource folders to create layouts for devices with larger screens :
7 inch tablets
res\layout-sw600dp
10 inch tablets
res\layout-sw720dp
Instead of using the dp size unit you can use the sdp size unit that is relative to the screen size.
Using the sdp size unit you will have the same user experience on all screen sizes with only one layout xml.
Use it carefully! for example, in most cases you still need to design a different layout for tablets.
For text view sizes please refer to the ssp size unit (based on the sp size unit)
For Multiple screen support:
values (For mdpi devices)
values-hdpi (For hdpi devices)
values-xhdpi (For xhdpi devices)
values-xxhdpi (For xxhdpi devices)
layout-sw600dp (For 7″ to 9″ Screen)
layout-sw720dp (For 10″ to above screen)
For image resources: Create 4 drawable folders:
drawable-mdpi
drawable-hdpi
drawable-xhdpi
drawable-xxhdpi