tags:

views:

39

answers:

1

Hi!

I have a layout in which I resize an image by doing a transformation with prescale. After the scale the image has the right size, but the layout container around it cuts its size of. I want the layout container arround it to show to complete image.

I just tried invalidate on the image, the container as well as requestLayout(). Any ideas?

Thanks

A: 

How are you transforming the image? If you are setting a matrix on an ImageView, you need to tell the ImageView to adjust its bounds to the size of the content. If you are scaling the image by setting a transformation on the Canvas, you must change the dimensions of the View yourself.

Romain Guy