I need to support an application for bith mdpi, hdpi and xhdpi mobiles and 7' and 10' tablets I have to admit that I'm a bit lost.
So far I only did the tablet version and what I did is :
I have the impression that I messed it up and that I should have the created standard "drawable-mdpi", "drawable-hdpi" and "drawable-xhdpi" folders.
But if I do so :
I already read the Android recommendation like a 1000 times and I am still confused...
EDIT 1
This paragraph from Android website answered my question "how to have to name the "layout" folders to have a different version for mobiles and tablets?"
EDIT 2
Regarding the drawable folders, for mobile phones, it seems quite clear that I have to create 3 folders this way :
Still remains the question of how to name the different drawable folders for supporting tablets.
so this would be my answer.
Layouts -> 2 folders :
Drawables -> 5 folders :
Any better response than this one is welcome!
Because LDPI is barely used you should make 3 different sizes of images for mobiles.
Lets say you have an image which is 50x50 DP.
MDPI = 50x50PX
HDPI = 75x75PX (x1.5)
XHDPI = 100x100PX (x2.0)
You can create even more folders like: drawable-xlarge-xhdpi
and drawable-xlarge-hdpi
and put images you need for the tablets in there. I believe xlarge was for 10-inch? So you might end up with about 9 different sizes. 3 for mobile, 3 for 7' and 3 for 10'. Tablets also have pixel densities!
Right click your project in Eclipse -> New -> Other -> Android XML File
And then you choose Drawable as a recourse type to make drawable folders for example.
Below is a screenshot of how this looks. It's really useful!
Also see list of displays by pixel density
Using this you make folders that will look like this. large is 7', xlarge was 10' (I think).
/res/drawable-large-mdpi
/res/drawable-large-hdpi
/res/drawable-large-xhdpi
/res/drawable-xlarge-mdpi
/res/drawable-xlarge-hdpi
/res/drawable-xlarge-xhdpi
7 inch Android tablets are HDPI and large.
Check the table here and read about large/xlarge/small etc.
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