Package com.cheetahdigital.friends.ui
Class FriendsAdapter
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.Adapter<VH>
-
- com.cheetahdigital.uikit.widget.list.ListAdapter<Friend,FriendsViewHolder>
-
- com.cheetahdigital.friends.ui.FriendsAdapter
-
public class FriendsAdapter extends com.cheetahdigital.uikit.widget.list.ListAdapter<Friend,FriendsViewHolder>
The adapter forFriendsFragment
-
-
Constructor Summary
Constructors Constructor Description FriendsAdapter(java.util.List<Friend> friendList, OnItemClickListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bindNormalViewHolder(FriendsViewHolder holder, int position)
Abstract method to bind the normal view holder.protected FriendsViewHolder
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
-
FriendsAdapter
public FriendsAdapter(java.util.List<Friend> friendList, OnItemClickListener listener)
-
-
Method Detail
-
createNormalViewHolder
protected FriendsViewHolder 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<Friend,FriendsViewHolder>
- Parameters:
parent
- used to get resourceviewType
- type of view- Returns:
- view holder for non special items
-
bindNormalViewHolder
protected void bindNormalViewHolder(FriendsViewHolder 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<Friend,FriendsViewHolder>
- Parameters:
holder
- view holder to vindSposition
- index of the item
-
-