T - The type of the items. Must be something that extends from List like Listpublic class ListDelegationAdapter<T extends java.util.List<?>> extends AbsDelegationAdapter<T>
List. This adapter
implementation is ready to go. All you have to do is to add AdapterDelegates to the
internal AdapterDelegatesManager i.e. in the constructor:
class MyAdapter extends AbsDelegationAdapter<List<Foo>>{
public MyAdapter(){
this.delegatesManager.add(new FooAdapterDelegate());
this.delegatesManager.add(new BarAdapterDelegate());
}
}
delegatesManager, items| Constructor and Description |
|---|
ListDelegationAdapter() |
ListDelegationAdapter(AdapterDelegate<T>... delegates)
Adds a list of
AdapterDelegates |
ListDelegationAdapter(AdapterDelegatesManager<T> delegatesManager) |
| Modifier and Type | Method and Description |
|---|---|
int |
getItemCount() |
getItems, getItemViewType, onBindViewHolder, onBindViewHolder, onCreateViewHolder, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, setItemsbindViewHolder, createViewHolder, getItemId, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onDetachedFromRecyclerView, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserverpublic ListDelegationAdapter()
public ListDelegationAdapter(@NonNull
AdapterDelegatesManager<T> delegatesManager)
public ListDelegationAdapter(@NonNull
AdapterDelegate<T>... delegates)
AdapterDelegatesdelegates -