Reputation: 209
If I put my application resources in drawable-xdpi
then it is automatically down converted for hdpi
, mdpi
and ldpi
by ration 0.75
, 0.05
and so on.
Why we need to create extra resource if one type is enough only?
I believe it is enough if I create for xhdpi
and let Android down scales automatically. I have gone through this question
What is the best way to create drawables for different dpi
but no one has given answer that yes you can go this way.
Suppose I kept my images in xhdpi
and when app opens in hdpi
it will reduce size to 0.75
, when it opens in mdpi
it reduces size to 0.5
.
So what is best way to create draw able asset? Please suggest perfect way with valid reason.
If not needed why we are creating so many resources instead for one only like xdpi
?
Upvotes: 4
Views: 283
Reputation: 43728
There are two reasons to provide more than one image:
If none of them is a problem for you, it is also fine to go just with one image.
Upvotes: 2
Reputation: 1050
If u want to display same image with different resolutions in devices
xhdpi image then place it drawable-xhdpi
hdpi image then place it in drawable-hdpi**
or to maintain a drawable folder place all the images what you want to display it will display with same size in all devices irrespective of the resolution.
Upvotes: 2