1

I'm using a TextureView to show a cropped video by setting a scale-matrix with setTransform(matrix) like in this tutorial. So the video gets larger than the view itself. This works fine for all android versions except for KitKat (4.4).

The problem I have here is that the TextureView's content is not cropped at the view-bounds - it draws the cropped-away part of the video too. However, the outside part is only updated when the layout refreshes (scroll).

A cropped video (nature.mp4) should look like this:

state on lollipop

This is what it looks like on KitKat (I'm showing layout bounds in this screenshot):

state on kitkat

I tried setting clip-bounds to the view-bounds via setClipBounds(..) - that's not working. Also, I can't use Canvas.clipRect(..) since TextureView's draw-method is final.

It's clearly a bug with KitKat, but has anyone an idea for a workaround?

fadden
  • 51,356
  • 5
  • 116
  • 166
Day
  • 844
  • 1
  • 9
  • 21
  • I am also having same problem.Do you have any solution for this? or have you find the solution? please help – Sagar Jan 23 '18 at 10:24

0 Answers0