Prevent flicker

pull/155/head
M66B 6 years ago
parent 55bb518ad5
commit 2680a2d64f

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

Loading…
Cancel
Save