Wednesday, 2 May 2012

Image get be zoomed in Android

I had a problem, when I'm using a list of icons and texts in android app, when i press on the list item, the icon must be shown in another activity with size larger than the current(on the list item), when I press back to back to the list activity, i saw the image get zoomed. I solved the issue by creating new object from the current Drawable via the code bellow
Bitmap bitmap = ((BitmapDrawable)listItemIconDrawableObject).getBitmap();   
BitmapDrawable d = new BitmapDrawable(bitmap);
//use d whenever you want


Mohammad Abu Hmead

No comments:

Post a Comment