public abstract class LayoutItemsAdapter<T,VH extends ItemsAdapter.ViewHolder> extends ItemsAdapter<T,VH>
ItemsAdapter
implementation that allows to populate any ViewGroup with views created by
this adapter, see addItemsTo(android.view.ViewGroup)
.ItemsAdapter.ViewHolder
Modifier | Constructor and Description |
---|---|
protected |
LayoutItemsAdapter() |
protected |
LayoutItemsAdapter(boolean useRecycler) |
Modifier and Type | Method and Description |
---|---|
protected void |
addItemsTo(android.view.ViewGroup layout)
Removes all child views from given view group and fill it in with items populated from this
adapter.
|
void |
attachLayout(android.view.ViewGroup newContainer)
Attaches given view group to adapter to be populated with views when
notifyDataSetChanged() method is called.If other view group was already attached it will be cleared first. |
void |
notifyDataSetChanged() |
protected void |
onRecycleView(android.view.View view)
Called when view is recycled.
|
protected android.view.View |
pollRecycledView(int viewType) |
protected void |
recycleAllFrom(android.view.ViewGroup layout)
Removing and recycling all child views from given view group
|
getCount, getItem, getItemId, getItemsList, getView, onBindHolder, onCreateHolder, setItemsList
protected LayoutItemsAdapter()
protected LayoutItemsAdapter(boolean useRecycler)
public void attachLayout(android.view.ViewGroup newContainer)
notifyDataSetChanged()
method is called.public void notifyDataSetChanged()
notifyDataSetChanged
in class android.widget.BaseAdapter
protected void addItemsTo(android.view.ViewGroup layout)
protected void recycleAllFrom(android.view.ViewGroup layout)
protected android.view.View pollRecycledView(int viewType)
protected void onRecycleView(android.view.View view)