Skip to content Skip to sidebar Skip to footer

Why Does Imageview.setimagematrix() Not Work?

I want to rotate an image using ImageView.setImageMatrix(matrix) but it simply doesn't have any effect. I call matrix.postRotate(45, 20, 20); before passing it to the function abov

Solution 1:

I'm not really sure but I think you should set scale type:

imgView.setScaleType(ScaleType.MATRIX);

You can also do that in XML with android:scaleType="matrix".

Post a Comment for "Why Does Imageview.setimagematrix() Not Work?"