Diffy
Diffy

Reputation: 2359

drawable mdpi/ldpi/hdpi should be drawable normal/small/large?

I put different image sizes under ldpi/mdpi/hdpi folders so that it can serve different sized screens. So shouldnt the hdpi/ldpi folders should be large/small. Because here we are not putting images for different densities but different screen-sizes in fact.

If it is related to density,then suppose if a small screen device has a very high density(ppi), then the hdpi image should be applied in case of this device.

I have gone through the developer docs for supporting different screen sizes but still little unclear about this.

Upvotes: 0

Views: 665

Answers (2)

Hareshkumar Chhelana
Hareshkumar Chhelana

Reputation: 24848

Try this way,hope this will help you to solve your problem.

There are below Possible drawable folders in android :

drawable-ldpi
drawable-mdpi
drawable-hdpi
drawable-xhdpi
drawable-xxhdpi
drawable-sw600dp // 7 inch tablet
drawable-sw720dp  // 10 inch tablet

Upvotes: 1

CommonsWare
CommonsWare

Reputation: 1006809

So for differnt screen sizes, should we use drawable small/medium/large?

You should use both types of qualifiers (e.g., res/drawable-large-mdpi/) as needed, for whichever densities you choose to ship. For images that do not need to change based on screen size, just use the density qualifier. For images that do need to change size based on screen size, also include a screen size qualifier, either the legacy ones (e.g., -large) or the newer ones (e.g., -sw600dp).

Upvotes: 1

Related Questions