Class ReceiptsAdapter
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.Adapter<VH>
-
- com.cheetahdigital.uikit.widget.list.ListAdapter<D,VH>
-
- com.cheetahdigital.uikit.widget.list.EndlessListAdapter<Receipt,ReceiptViewHolder>
-
- com.cheetahdigital.receipt.ui.list.ReceiptsAdapter
-
public class ReceiptsAdapter extends com.cheetahdigital.uikit.widget.list.EndlessListAdapter<Receipt,ReceiptViewHolder>
Extended version ofEndlessListAdapter
for Receipts The model for this adapter isReceipt
and the view holder isReceiptViewHolder
-
-
Constructor Summary
Constructors Constructor Description ReceiptsAdapter(java.util.List<Receipt> dataList, ReceiptClickListener receiptClickListener)
Constructor of the Adapter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bindNormalViewHolder(ReceiptViewHolder holder, int position)
Abstract method to bind the normal view holder.protected ReceiptViewHolder
createNormalViewHolder(android.view.ViewGroup parent, int viewType)
Abstract method to create normal view holder.-
Methods inherited from class com.cheetahdigital.uikit.widget.list.EndlessListAdapter
getItemCount, getItemViewType, getReload, isAppending, onBindViewHolder, onCreateViewHolder, setIsAppending, setReload
-
Methods inherited from class com.cheetahdigital.uikit.widget.list.ListAdapter
addAll, addItem, addItem, clear, getDataList, getItemAt, getPlaceHolderResource, insertItems, isListEmpty, 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
-
ReceiptsAdapter
public ReceiptsAdapter(java.util.List<Receipt> dataList, ReceiptClickListener receiptClickListener)
Constructor of the Adapter- Parameters:
dataList
- the list of receipts to be displayedreceiptClickListener
- callback for item click
-
-
Method Detail
-
createNormalViewHolder
protected ReceiptViewHolder 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<Receipt,ReceiptViewHolder>
- Parameters:
parent
- used to get resourceviewType
- type of view- Returns:
- view holder for non special items
-
bindNormalViewHolder
protected void bindNormalViewHolder(ReceiptViewHolder 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<Receipt,ReceiptViewHolder>
- Parameters:
holder
- view holder to vindSposition
- index of the item
-
-