java - Do I have to use different image sizes on android apps or is there a way to change the image resolution? -
do have use 5 different image sizes on android apps or there other way change resolution of image using bitmap or else?
i'm copying 5 different sizes seems there should better way programmatically.
it's best load smaller resource smaller screen density , larger resource larger density due how memory larger bitmap has allocate.
although need bitmap scale size manage several screen sizes, call
bitmap.createscaledbitmap(bitmap src, int dstwidth, int dstheight, boolean filter)
another way if drawing bitmap ondraw(), can use drawbitmap() method passing destination rect/rectf image automatically fill.
Comments
Post a Comment