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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/suggestions/TileView.java

Issue 2673003003: Rename MostVisited ui bits to Tile(Grid). (Closed)
Patch Set: Rebase. 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
Index: chrome/android/java/src/org/chromium/chrome/browser/suggestions/TileView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItemView.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/TileView.java
similarity index 65%
rename from chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItemView.java
rename to chrome/android/java/src/org/chromium/chrome/browser/suggestions/TileView.java
index cffb2e64f7a4ea2f209747d9cfd19d792da870c7..1c62d72011bc5e54cec63506767c469f4eb7b4c7 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/MostVisitedItemView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/TileView.java
@@ -2,7 +2,7 @@
// 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;
+package org.chromium.chrome.browser.suggestions;
import android.content.Context;
import android.graphics.drawable.Drawable;
@@ -16,16 +16,16 @@ import android.widget.TextView;
import org.chromium.chrome.R;
/**
- * The view for a most visited item. Displays the title of the page beneath a large icon. If a large
- * icon isn't available, displays a rounded rectangle with a single letter in its place.
+ * The view for a site suggestion tile. Displays the title of the site beneath a large icon. If a
+ * large icon isn't available, displays a rounded rectangle with a single letter in its place.
*/
-public class MostVisitedItemView extends FrameLayout {
+public class TileView extends FrameLayout {
private String mUrl;
/**
* Constructor for inflating from XML.
*/
- public MostVisitedItemView(Context context, AttributeSet attrs) {
+ public TileView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@@ -33,22 +33,22 @@ public class MostVisitedItemView extends FrameLayout {
* Sets the title text.
*/
public void setTitle(String title) {
- ((TextView) findViewById(R.id.most_visited_title)).setText(title);
+ ((TextView) findViewById(R.id.tile_view_title)).setText(title);
}
/**
* Sets the icon, or null to clear it.
*/
public void setIcon(@Nullable Drawable icon) {
- ((ImageView) findViewById(R.id.most_visited_icon)).setImageDrawable(icon);
+ ((ImageView) findViewById(R.id.tile_view_icon)).setImageDrawable(icon);
}
/**
* Sets whether the page is available offline.
*/
public void setOfflineAvailable(boolean offlineAvailable) {
- findViewById(R.id.offline_badge).setVisibility(
- offlineAvailable ? View.VISIBLE : View.INVISIBLE);
+ findViewById(R.id.offline_badge)
+ .setVisibility(offlineAvailable ? View.VISIBLE : View.INVISIBLE);
}
/**

Powered by Google App Engine
This is Rietveld 408576698