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

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

Issue 1833763002: Add new NTP layout with snippet cards and hide it behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address more comments Created 4 years, 9 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/AboveTheFoldListItem.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/AboveTheFoldListItem.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/AboveTheFoldListItem.java
new file mode 100644
index 0000000000000000000000000000000000000000..3e1efb8db88258451ec481345e9f83b1f459e136
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/AboveTheFoldListItem.java
@@ -0,0 +1,21 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.ntp.cards;
+
+/**
+ * Item in the RecyclerView that will hold the above the fold contents for the NTP, i.e. the
+ * logo, tiles and search bar that are initially visible when opening the NTP.
+ *
+ * When using the new NTP UI, that is based on a RecyclerView, the view containing the entire
+ * content of the old UI is put in the AboveTheFoldListItem, and inserted in the RecyclerView.
+ * Other elements coming after it and initially off-screen are just added to the RecyclerView after
+ * that.
+ */
+class AboveTheFoldListItem implements NewTabPageListItem {
+ @Override
+ public int getType() {
+ return NewTabPageListItem.VIEW_TYPE_ABOVE_THE_FOLD;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698