Reputation: 46919
I have question regarding Android Layouts.I have read the documentation of Layouts .My question is that while developing lets say if the images are placed in the folders named
drawable-hdpi
drawable-ldpi
drawable-mdpi
drawable-xhdpi
Does drawable-ldpi refers to the phones with smaller screen ,drawable-xhdpi for tabs and drawable-mdpi medium sized screen phones.
If not i have a image i need to be able to put into all types of devices namingly phone,tab
How can i do it.
Upvotes: 0
Views: 86
Reputation: 22637
usually, larger screens have higher DPIs, but that is not always the case. if you are trying to differentiate between phone and tablet screens, density is not the right way. use the following,
drawable
: phones drawable-sw600dp
: 7" tablets drawable-sw720dp
: 10" tabletsalternatively, you can use the screen size: small
, medium
, large
, xlarge
. e.g., drawable-large
. from the docs,
xlarge
screens are at least 960dp x 720dplarge
screens are at least 640dp x 480dpnormal
screens are at least 470dp x 320dpsmall
screens are at least 426dp x 320dphttp://developer.android.com/guide/practices/screens_support.html
Upvotes: 2
Reputation: 46425
Googling Android xhdpi
brings up the Android resource on how you should use these:
http://developer.android.com/guide/practices/screens_support.html
DPI means how many dots per inch there are. Some small phones fit lots of dots in, which gives them a high DPI. You should provide different sized images for different resolutions. Google recommends creating images in the ration of 3:4:6:8
for l, m, h and xh DPIs.
Upvotes: 1