Tuesday, 13 August 2013

Setting ImageView divides Drawable size by two

Setting ImageView divides Drawable size by two

I have created a dress up game app. After the user finishes dressing up
his character, he/she can save it to the app's gallery.
I am using canvas and drawbitmap on canvas to generate the final image,
which is then shown on the app's gallery. The xhdpi image size should be
600x900 pixels. When this image is shown in the normal android gallery, it
is shown as 600x900 and it (got from info) looks big enough. However, when
I show it in my app, it looks much smaller though the ImageView is set to
wrap_content. Moreover, when dressing it up, it is also set to
wrap_content and it looks bigger than the one in the app's gallery.
My theory is that because I'm trying to set it programmatically using
.setImageDrawable(Drawable.createFromPath(path)); and because the screen
is xhdpi, it is dividing the size by two.
What can I do?

No comments:

Post a Comment