Reputation: 1668
I have an image view which has different size on normal and large sized screens(I achived it via dimens.xml), lets assume 100*100 dp on small and 133*133 dp on large sized screen.
I'm setting image to it programatically, let's say it is def.png
Now for best performance I should create 6 versions of def.png(assuming i cater only to mdpi, hdpi and xhdpi densities)
small-xhdpi - 200*200 px
large-mdpi - 133*133 px
It means 6 def.png images, but I can put 3 of them because only 3 folders are available i.e. drawable-mdpi, drawable-hdpi, drawable-xhdpi.
How should I achieve best performance so that there will be less scaling up and down of Images ??
or
If it is not possible this way, then what are the alternatives ?
Upvotes: 0
Views: 1426
Reputation: 703
How to Support Multiple Screens:-
Source :- https://developer.android.com/guide/practices/screens_support.html#support
Upvotes: 1