Why does ImageView.setImageMatrix() not work?

后端 未结 1 1442
心在旅途
心在旅途 2021-01-03 19:43

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 funct

相关标签:
1条回答
  • 2021-01-03 20:24

    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".

    0 讨论(0)
提交回复
热议问题