Following folder structure is working fine for the mentioned devices and resolutions:
- drawable-hdpi -- for 480x800
- drawable-ldpi -- empty
- drawable-mdpi -- for 320x480 and 240x320 (mdpi device)
- drawable-sw600dp-tvdpi -- for Nexus 7 2012 tvdpi
- drawable-sw600dp-xhdpi -- for Nexus 7 2013 xhdpi
The problem is with the Nexus 10 and Samsung Galaxy Tab 10 (Tab is with Android 4.0 & mdpi). To handle both devices I added two separate drawable folders:
- drawable-sw800dp-xhdpi -- for Nexus 10 (put 2560x1600 resolution images to this folder)
- drawable-sw800dp-mdpi -- for Samsung Galaxy Tab 10 (put 1280x800 resolution images to this folder)
However, both Nexus 10 and Samsung Galaxy Tab 10 are using images from drawable-sw800dp-xhdpi.
What else did I try?
- drawable-sw720dp-xhdpi -- for Nexus 10
- drawable-sw720dp-mdpi -- for Samsung Galaxy Tab 10
Similar result, both Nexus 10 and Samsung Galaxy Tab 10 are using images from drawable-sw720dp-xhdpi.
I also tried to use drawable-xlarge-mdpi
and drawable-xlarge-xhdpi
(removed drawable-sw800dp-mdpi & drawable-sw800dp-xhdpi) to handle Samsung Galaxy Tab 10 but Tab is with Android 4.0 and xlarge
structure is deprecated. So it is taking according to the new directory structure (i.e., drawable-sw600dp-xhdpi).
Other related stuff
In Eclipse graphical layout editor correct images (from drawable-sw800dp-mdpi) are shown after selecting 10.1" WXGA (Tablet) which is like Samsung Galaxy Tab 10. However, when I test the same thing in device or emulator it is showing images from drawable-sw800dp-xhdpi.
Manifrest:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
Layout:
layout
values:
values
values-sw320dp
values-sw600dp
values-sw800dp
- Separate drawable folder is required because some of the images can not be converted into 9 patch images.
- Please my question is not about conflicts between nexus 7 and nexus 10 or not between Samsung Galaxy Tab 7' and Samsung Galaxy Tab 10'.
The question
So what should be the drawable folders for Nexus 10 and Samsung Galaxy Tab 10?