Class ContentPagesAdapter
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.Adapter<VH>
-
- com.cheetahdigital.uikit.widget.list.ListAdapter<ContentPage,ContentPagesViewHolder>
-
- com.cheetahdigital.content.ui.contentpage.list.ContentPagesAdapter
-
public class ContentPagesAdapter extends ListAdapter<ContentPage,ContentPagesViewHolder>
List Adapter forContentPage
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.cheetahdigital.uikit.widget.list.ListAdapter
ListAdapter.EmptyViewHolder
-
-
Field Summary
-
Fields inherited from class com.cheetahdigital.uikit.widget.list.ListAdapter
VIEW_TYPE_HEADER, VIEW_TYPE_NORMAL
-
-
Constructor Summary
Constructors Constructor Description ContentPagesAdapter(java.util.List<ContentPage> dataList, OnItemClickListener listener)
Constructor forContentPagesAdapter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bindNormalViewHolder(ContentPagesViewHolder holder, int position)
Abstract method to bind the normal view holder.protected ContentPagesViewHolder
createNormalViewHolder(android.view.ViewGroup parent, int viewType)
Abstract method to create normal view holder.int
getItemCount()
-
Methods inherited from class com.cheetahdigital.uikit.widget.list.ListAdapter
addAll, addItem, addItem, clear, getDataList, getItemAt, getItemViewType, getPlaceHolderResource, insertItems, isListEmpty, onBindViewHolder, onCreateViewHolder, removeItem, replaceItemAt, setCustomEmptyMessageResource, setPlaceHolderResource, sort
-
Methods inherited from class androidx.recyclerview.widget.RecyclerView.Adapter
bindViewHolder, createViewHolder, getItemId, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserver
-
-
-
-
Constructor Detail
-
ContentPagesAdapter
public ContentPagesAdapter(java.util.List<ContentPage> dataList, OnItemClickListener listener)
Constructor forContentPagesAdapter
- Parameters:
dataList
- list ofContentPage
to be displayedlistener
- instance ofOnItemClickListener
-
-
Method Detail
-
createNormalViewHolder
protected ContentPagesViewHolder createNormalViewHolder(android.view.ViewGroup parent, int viewType)
Description copied from class:ListAdapter
Abstract method to create normal view holder.- Specified by:
createNormalViewHolder
in classListAdapter<ContentPage,ContentPagesViewHolder>
- Parameters:
parent
- used to get resourceviewType
- type of view- Returns:
- view holder for non special items
-
bindNormalViewHolder
protected void bindNormalViewHolder(ContentPagesViewHolder holder, int position)
Description copied from class:ListAdapter
Abstract method to bind the normal view holder.- Specified by:
bindNormalViewHolder
in classListAdapter<ContentPage,ContentPagesViewHolder>
- Parameters:
holder
- view holder to vindSposition
- index of the item
-
getItemCount
public int getItemCount()
- Overrides:
getItemCount
in classListAdapter<ContentPage,ContentPagesViewHolder>
-
-