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
Post a Comment