Class DynamicItemsAdapter
java.lang.Object
androidx.recyclerview.widget.RecyclerView.Adapter<VH>
com.pranavpandey.android.dynamic.support.recyclerview.adapter.DynamicRecyclerViewAdapter<RecyclerView.ViewHolder>
com.pranavpandey.android.dynamic.support.recyclerview.adapter.DynamicBinderAdapter<VB>
com.pranavpandey.android.dynamic.support.recyclerview.adapter.DynamicSimpleBinderAdapter<ItemBinder>
com.pranavpandey.android.dynamic.support.recyclerview.adapter.DynamicItemsAdapter
A
DynamicSimpleBinderAdapter
to display the list of DynamicItem
inside a recycler view.-
Nested Class Summary
Nested classes/interfaces inherited from class com.pranavpandey.android.dynamic.support.recyclerview.adapter.DynamicRecyclerViewAdapter
DynamicRecyclerViewAdapter.DynamicRecyclerViewItem, DynamicRecyclerViewAdapter.ItemType
-
Field Summary
Fields inherited from class com.pranavpandey.android.dynamic.support.recyclerview.adapter.DynamicRecyclerViewAdapter
TYPE_EMPTY_VIEW, TYPE_ITEM, TYPE_SECTION_DIVIDER, TYPE_SECTION_HEADER, TYPE_SETTING, TYPE_UNKNOWN
-
Constructor Summary
ConstructorDescriptionDynamicItemsAdapter
(Collection<? extends DynamicItem> data) Constructor to initialize an object of this class. -
Method Summary
Modifier and TypeMethodDescriptiongetData()
Get the data used by this adapter.getItem
(int position) Returns the item according to the supplied position.int
void
onBindViewHolder
(RecyclerView.ViewHolder holder, int position) Methods inherited from class com.pranavpandey.android.dynamic.support.recyclerview.adapter.DynamicSimpleBinderAdapter
addDataBinder, addDataBinders, addDataBinders, getBinderList, getBinderPosition, getDataBinder, getItemViewType, getPosition, notifyBinderItemRangeChanged, notifyBinderItemRangeInserted, notifyBinderItemRangeRemoved
Methods inherited from class com.pranavpandey.android.dynamic.support.recyclerview.adapter.DynamicBinderAdapter
notifyBinderDataSetChanged, notifyBinderItemChanged, notifyBinderItemInserted, notifyBinderItemMoved, notifyBinderItemRemoved, onCreateViewHolder
Methods inherited from class com.pranavpandey.android.dynamic.support.recyclerview.adapter.DynamicRecyclerViewAdapter
getContext, getLayoutManager, getRecyclerView, isComputingLayout, onAttachedToRecyclerView
Methods inherited from class androidx.recyclerview.widget.RecyclerView.Adapter
bindViewHolder, createViewHolder, getItemId, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserver
-
Constructor Details
-
DynamicItemsAdapter
Constructor to initialize an object of this class.- Parameters:
data
- The data for this adapter.
-
-
Method Details
-
onBindViewHolder
- Overrides:
onBindViewHolder
in classDynamicBinderAdapter<ItemBinder>
-
getItemCount
public int getItemCount()- Overrides:
getItemCount
in classDynamicSimpleBinderAdapter<ItemBinder>
-
getData
Get the data used by this adapter.- Returns:
- The data used by this adapter.
A list of
DynamicItem
.
-
getItem
Returns the item according to the supplied position.- Parameters:
position
- The position to get the item.- Returns:
- The item according to the supplied position.
-