How to prevent Canvas auto clear in android?

165 views Asked by At

I have a recyclerView that I added a itemTouchHelper callback that works with onTouch methods.

When I swipe and click anywhere outside of the viewholder it should make the button disappear and bring the viewholder back to its original location.

My problem is (only) when I swipe, touch the EditText and drag it down, the button I drew on the canvas seems to disappear. I tried to find where onChildDraw was called but it does not enter the function so I assume it has something to do with canvas itself.

Example video to show the problem.

0

There are 0 answers