Closed cvetelinandreev closed 1 month ago
Onyx, team, Seems that you are very busy to look at this. I solved it by detecting local 'jumps' in the touch points. If there is a larger gap between two points it means we are off and need to be adjusted.
It works. The result is better than before but sometimes the first stroke gets cut a bit.
The issue was that I was using a scrollable view to creat the touchHelper (TouchHelper.create(View, callback)) I fixed the issue by passing a hostView that has the size of the screen.
Hi
I have a view inside a scroll view. When the view is scrolled down sometimes I get the Y coordinates absolute, sometimes relative to the visible rectangle of the view. Take a look at the code below. When I detect a touch with the finger I call setRawDrawingEnabled twice to enable interactions with the fingers. In that case I get the Y coordinate of the touch point inside onBeginRawDrawing relative to the visible rect. If I call only touchHelper.setRawDrawingEnabled(false) and then enable raw drawing trough a button in the UI then I get the Y coordinate of the touch point inside onBeginRawDrawing in absolute coordinates (relative to the visible rect + the scroll)
The behaviour in the case when setRawDrawingEnabled is called twice is inconsistent and depends somehow on the way the view is scrolled.
Any ideas how to workaround it? Both getting consistent coordinates or another way of enabling finger actions when the raw input is on work.
Thank you!