Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java |
index d9f4470a5eb28af3edd95a0305c919af43bca071..967a3b45664703a26e7b2a88c4b3d9e0321762b9 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java |
@@ -52,7 +52,7 @@ |
/** View used to calculate the position of the cards' snap point. */ |
private View mAboveTheFoldView; |
- /** Whether the RecyclerView should react to touch events. */ |
+ /** Whether the RecyclerView and its children should react to touch events. */ |
private boolean mTouchEnabled = true; |
/** Whether the above-the-fold left space for a peeking card to be displayed. */ |
@@ -89,6 +89,7 @@ public boolean isFirstItemVisible() { |
@Override |
public boolean onInterceptTouchEvent(MotionEvent ev) { |
mGestureDetector.onTouchEvent(ev); |
+ if (!mTouchEnabled) return true; |
return super.onInterceptTouchEvent(ev); |
} |
@@ -411,7 +412,7 @@ public boolean gatherTransparentRegion(Region region) { |
* Animates the card being swiped to the right as if the user had dismissed it. Any changes to |
* the animation here should be reflected also in |
* {@link #updateViewStateForDismiss(float, ViewHolder)} and reset in |
- * {@link CardViewHolder#onBindViewHolder(NewTabPageItem)}. |
+ * {@link CardViewHolder#onBindViewHolder()}. |
* @param suggestion The item to be dismissed. |
*/ |
public void dismissItemWithAnimation(SnippetArticle suggestion) { |