Class HostsAdapter
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.Adapter<VH>
-
- com.cheetahdigital.uikit.widget.list.ListAdapter<Host,HostViewHolder>
-
- com.cheetahdigital.event.ui.eventdate.detail.HostsAdapter
-
public class HostsAdapter extends com.cheetahdigital.uikit.widget.list.ListAdapter<Host,HostViewHolder>
The adapter forEventDateDetailsActivity
-
-
Constructor Summary
Constructors Constructor Description HostsAdapter(java.util.List<Host> dataList)
Constructor ofHostsAdapter
HostsAdapter(java.util.List<Host> dataList, OnHostSelectedListener listener)
Constructor forHostsAdapter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bindNormalViewHolder(HostViewHolder holder, int position)
Abstract method to bind the normal view holder.protected HostViewHolder
createNormalViewHolder(android.view.ViewGroup parent, int viewType)
Abstract method to create normal view holder.-
Methods inherited from class com.cheetahdigital.uikit.widget.list.ListAdapter
addAll, addItem, addItem, clear, getDataList, getItemAt, getItemCount, 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
-
HostsAdapter
public HostsAdapter(java.util.List<Host> dataList)
Constructor ofHostsAdapter
- Parameters:
dataList
- list ofHost
to bind with the adapter
-
HostsAdapter
public HostsAdapter(java.util.List<Host> dataList, OnHostSelectedListener listener)
Constructor forHostsAdapter
- Parameters:
dataList
- list ofHost
to bind with the adapterlistener
- theOnHostSelectedListener
that handles when an event is clicked
-
-
Method Detail
-
createNormalViewHolder
protected HostViewHolder createNormalViewHolder(android.view.ViewGroup parent, int viewType)
Description copied from class:com.cheetahdigital.uikit.widget.list.ListAdapter
Abstract method to create normal view holder.- Specified by:
createNormalViewHolder
in classcom.cheetahdigital.uikit.widget.list.ListAdapter<Host,HostViewHolder>
- Parameters:
parent
- used to get resourceviewType
- type of view- Returns:
- view holder for non special items
-
bindNormalViewHolder
protected void bindNormalViewHolder(HostViewHolder holder, int position)
Description copied from class:com.cheetahdigital.uikit.widget.list.ListAdapter
Abstract method to bind the normal view holder.- Specified by:
bindNormalViewHolder
in classcom.cheetahdigital.uikit.widget.list.ListAdapter<Host,HostViewHolder>
- Parameters:
holder
- view holder to vindSposition
- index of the item
-
-