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

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

Issue 1459593002: Added a UI for the Interests Prototype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/NewTabPageToolbar.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageToolbar.java
index 4774642564835440dcc89c7206ebe7d2c00cc9a8..cfdb9a2c2cb0ae05a3724e44bd4924357a24ea2a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageToolbar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageToolbar.java
@@ -22,7 +22,7 @@ import org.chromium.chrome.browser.widget.TintedDrawable;
*/
public class NewTabPageToolbar extends LinearLayout {
- private ViewGroup mBookmarksButton, mRecentTabsButton;
+ private ViewGroup mBookmarksButton, mRecentTabsButton, mInterestsButton;
/**
* Constructor for inflating from xml.
@@ -39,6 +39,10 @@ public class NewTabPageToolbar extends LinearLayout {
return mRecentTabsButton;
}
+ public View getInterestsButton() {
+ return mInterestsButton;
+ }
+
@Override
protected void onFinishInflate() {
mBookmarksButton = initButton(R.id.bookmarks_button, R.drawable.btn_star);
@@ -49,6 +53,9 @@ public class NewTabPageToolbar extends LinearLayout {
((TextView) mBookmarksButton.getChildAt(0)).setContentDescription(
getResources().getString(R.string.offline_pages_ntp_button_accessibility));
}
+ ((TextView) mBookmarksButton.getChildAt(0)).setText(OfflinePageBridge.isEnabled()
+ ? R.string.offline_pages_ntp_button_name : R.string.ntp_bookmarks);
+ mInterestsButton = initButton(R.id.interests_button, R.drawable.btn_star_filled);
}
private ViewGroup initButton(int buttonId, int drawableId) {

Powered by Google App Engine
This is Rietveld 408576698