Android ImageView and Bitmap on canvas don't have the same size -


i have bitmap image in ressources.

when draw using imageview, doesn't have same size when draw on canvas using drawbitmap. no matter density use bitmap ( 160, 240 ), bitmap zoomed. how draw bitmap has same size when use imageview ?

the trick create scaled bitmap , draw.

my_bitmap = bitmapfactory.decoderesource(mcontext.getresources(), r.drawable.my_bitmap); my_bitmap = bitmap.createscaledbitmap(my_bitmap, screenwidth, screenheight, true); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -