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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/history/HistoryItemView.java

Issue 2542203002: [Android History] Add Android history manager UI and bridge (Closed)
Patch Set: Rebase, drop changes to time.* Created 4 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/history/HistoryItemView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryItemView.java b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryItemView.java
new file mode 100644
index 0000000000000000000000000000000000000000..d486f36f549b7af00c1ce49cb17576565887b8b4
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryItemView.java
@@ -0,0 +1,43 @@
+// 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.history;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.TextView;
+
+import org.chromium.chrome.R;
+import org.chromium.chrome.browser.widget.selection.SelectableItemView;
+
+/**
+ * The SelectableItemView for items displayed in the browsing history UI.
+ */
+public class HistoryItemView extends SelectableItemView<HistoryItem> {
+ private TextView mTitle;
+ private TextView mDomain;
+
+ public HistoryItemView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+ mTitle = (TextView) findViewById(R.id.title);
+ mDomain = (TextView) findViewById(R.id.domain);
+ }
+
+ @Override
+ public void setItem(HistoryItem item) {
+ super.setItem(item);
+ mTitle.setText(item.getTitle());
+ mDomain.setText(item.getDomain());
+ }
+
+ @Override
+ protected void onClick() {
+ // TODO(twellington): Handle clicks on the HistoryItemView.
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698