Make sure that we clear any nested offsets
We previously only did this on onTouchEvent(ACTION_DOWN)
which isn't guaranteed to be called if we intercept. Fixed
by now doing this in onInterceptTouchEvent() to.
BUG: 21991284
Change-Id: I98b02f065d5ade583dac931911b5b27eae0c4df0
diff --git a/v7/recyclerview/src/android/support/v7/widget/RecyclerView.java b/v7/recyclerview/src/android/support/v7/widget/RecyclerView.java
index f3385d8..fbdab7b 100644
--- a/v7/recyclerview/src/android/support/v7/widget/RecyclerView.java
+++ b/v7/recyclerview/src/android/support/v7/widget/RecyclerView.java
@@ -2238,6 +2238,9 @@
setScrollState(SCROLL_STATE_DRAGGING);
}
+ // Clear the nested offsets
+ mNestedOffsets[0] = mNestedOffsets[1] = 0;
+
int nestedScrollAxis = ViewCompat.SCROLL_AXIS_NONE;
if (canScrollHorizontally) {
nestedScrollAxis |= ViewCompat.SCROLL_AXIS_HORIZONTAL;