Storing the widget item views in Widget holder, to avoid looks on every bind/recycle

Change-Id: Ifad34f419b1b4f2bf97cc4ff533277867598a719
This commit is contained in:
Sunny Goyal
2016-05-19 09:33:30 -07:00
parent c64cfdd8fa
commit 81259cd086
3 changed files with 27 additions and 52 deletions

View File

@@ -18,16 +18,18 @@ package com.android.launcher3.widget;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.view.ViewGroup;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.R;
public class WidgetsRowViewHolder extends ViewHolder {
ViewGroup mContent;
public final ViewGroup cellContainer;
public final BubbleTextView title;
public WidgetsRowViewHolder(ViewGroup v) {
super(v);
mContent = v;
}
ViewGroup getContent() {
return mContent;
cellContainer = (ViewGroup) v.findViewById(R.id.widgets_cell_list);
title = (BubbleTextView) v.findViewById(R.id.section);
}
}