Reputation: 2974
I am changing the image matrix (zooming and dragging) and calling imageview.setImageMatrix(matrix) but the image won't change.
I didn't forget to set:
android:scaleType="matrix"
in the xml file.
I checked the Log and the touch events are intercepted correctly + the matrix itself is calculated correctly.
but still... no effect on the image on screen....
Did anyone encounter this strange behavior?
Upvotes: 2
Views: 5247
Reputation: 4431
This post might help you Why does ImageView.setImageMatrix() not work? and remember (from doc) Matrix does not have a constructor, so it must be explicitly initialized using either reset() - to construct an identity matrix, or one of the set..() functions (e.g. setTranslate, setRotate, etc.).
Upvotes: 1