Prevent flicker

This commit is contained in:
M66B 2019-04-27 14:34:52 +02:00
parent 55bb518ad5
commit 2680a2d64f
1 changed files with 7 additions and 1 deletions

View File

@ -1399,7 +1399,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
@Override
public boolean onTouchEvent(MotionEvent event) {
getParent().requestDisallowInterceptTouchEvent(true);
if (event.getPointerCount() == 2)
getParent().requestDisallowInterceptTouchEvent(true); // zoom
else if (event.getAction() == MotionEvent.ACTION_MOVE) {
int range = computeVerticalScrollRange() - computeVerticalScrollExtent();
if (range > 0) // scroll
getParent().requestDisallowInterceptTouchEvent(true);
}
return super.onTouchEvent(event);
}