Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1063)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java

Issue 2705343003: Revert of [Android NTP] Allow overlapping snap scroll regions. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
index 1f32c026c8bb3c14bd36fe6db6b7ead1935a0bc9..1994220097dc7f42a9727d9eac12361fbee15b48 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java
@@ -439,7 +439,8 @@
assert mPendingSnapScroll;
mPendingSnapScroll = false;
- mRecyclerView.snapScroll(mSearchBoxView, getHeight());
+ mRecyclerView.snapScroll(mSearchBoxView,
+ mRecyclerView.computeVerticalScrollOffset(), getHeight());
}
};
@@ -764,7 +765,8 @@
mRecyclerView.updatePeekingCardAndHeader();
// The positioning of elements may have been changed (since the elements expand to fill
// the available vertical space), so adjust the scroll.
- mRecyclerView.snapScroll(mSearchBoxView, getHeight());
+ mRecyclerView.snapScroll(mSearchBoxView,
+ mRecyclerView.computeVerticalScrollOffset(), getHeight());
}
/**
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698