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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/selection/SelectableItemViewHolder.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.widget.selection;
6
7 import android.support.v7.widget.RecyclerView;
8 import android.view.View;
9
10 /**
11 * An ViewHolder for a {@link SelectableItemView}.
12 * @param <E> The type of the item associated with the SelectableItemView.
13 */
14 public class SelectableItemViewHolder<E> extends RecyclerView.ViewHolder {
15 private SelectableItemView<E> mItemView;
16
17 /**
18 * @param itemView The SelectableItemView to be held by this ViewHolder.
19 * @param delegate The SelectionDelegate for the itemView.
20 */
21 @SuppressWarnings("unchecked")
22 public SelectableItemViewHolder(View itemView, SelectionDelegate<E> delegate ) {
23 super(itemView);
24 mItemView = (SelectableItemView<E>) itemView;
25 mItemView.setSelectionDelegate(delegate);
26 }
27
28 /**
29 * @param item The item to display in the SelectableItemView held by this Vi ewHolder.
30 */
31 public void displayItem(E item) {
32 mItemView.setItem(item);
33 }
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698