Search code examples
androidzooming

TouchImageView leaves trails


I am using TouchImageView to get the Zoom in/out feature on my ImageView. Though it works, when i zoom out it is not clearing previous zoomed-in causing trails around the image, like in the image shown below. Please see the wavy at top and bottom that occurred when i zoomed out leaving trails of zoomed image.

I tried invaldiate() before matrix.postTranslate, but that didn't solve this. Anyway to get this zoom out work without leaving the trail.

Image with trails

Thank you.


Solution

  • This issue was gone, after setting background color to the ImageView. In my case i set it to Color.Black