1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 04:35:57 +00:00

Prevent flicker

This commit is contained in:
M66B 2019-04-27 14:34:52 +02:00
parent 55bb518ad5
commit 2680a2d64f

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);
}