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 ie 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 ?
How to Support Multiple Screens:-
Source :- https://developer.android.com/guide/practices/screens_support.html#support
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.