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

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

Issue 2223743004: 📰 Add an action button that can be used in sections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 4 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/NewTabPageListItem.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageListItem.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageListItem.java
index 9a73f1377c98dd71970f3b0b8e0b930ff0331754..ce96a5b76e2b37dfd300622b023bb52e9cbc6c60 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageListItem.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageListItem.java
@@ -18,7 +18,7 @@
* @see NewTabPageListItem#getType()
*/
@IntDef({VIEW_TYPE_ABOVE_THE_FOLD, VIEW_TYPE_HEADER, VIEW_TYPE_SNIPPET, VIEW_TYPE_SPACING,
- VIEW_TYPE_STATUS, VIEW_TYPE_PROGRESS})
+ VIEW_TYPE_STATUS, VIEW_TYPE_PROGRESS, VIEW_TYPE_ACTION})
@Retention(RetentionPolicy.SOURCE)
public @interface ViewType {}
@@ -59,6 +59,12 @@
public static final int VIEW_TYPE_PROGRESS = 6;
/**
+ * View type for a {@link ActionListItem}, an action button.
+ * @see Adapter#getItemViewType(int)
+ */
+ public static final int VIEW_TYPE_ACTION = 7;
+
+ /**
* Returns the type ({@link ViewType}) of this list item. This is so we can
* distinguish between different elements that are held in a single RecyclerView holder.
*

Powered by Google App Engine
This is Rietveld 408576698