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

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

Issue 2106753002: Refine snap scrolling on the Cards New Tab Page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update histograms.xml Created 4 years, 6 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
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 e6f2003ecf5fc2304d299fb03663901130c0dc6e..2bf2f2c0a2fc4abb42dc2f2e162f7f8635007778 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
@@ -192,6 +192,18 @@ public class NewTabPageRecyclerView extends RecyclerView {
}
}
+ public boolean isPeekingCardVisible() {
+ return findFirstCard() != null;
+ }
+
+ public int getPeekingCardTop() {
+ return getChildAt(2).getTop();
Bernhard Bauer 2016/06/28 14:00:17 Okay, I know all of that stuff is only temporarily
PEConn 2016/06/28 14:32:51 Done.
+ }
+
+ public int getPeekingCardHeight() {
+ return getChildAt(2).getHeight();
+ }
+
/**
* Finds the first card in this RecyclerView.
* @return The viewholder for the first card or null if no card is available.

Powered by Google App Engine
This is Rietveld 408576698