Package com.xffffff.wellfed.common
Class ItemAdapter<Item>
- java.lang.Object
-
- androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
-
- com.xffffff.wellfed.common.ItemAdapter<Item>
-
- Direct Known Subclasses:
EditItemAdapter
,IngredientDetailAdapter
,MealPlanItemAdapter
public abstract class ItemAdapter<Item> extends androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
The class ItemAdapter is used to display items in a RecyclerView
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Item>
items
list ofItemAdapter
-
Constructor Summary
Constructors Constructor Description ItemAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getItemCount()
java.util.List<Item>
getItems()
void
setItems(java.util.List<Item> items)
-
Methods inherited from class androidx.recyclerview.widget.RecyclerView.Adapter
bindViewHolder, createViewHolder, getItemId, getItemViewType, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onBindViewHolder, onCreateViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserver
-
-
-
-
Field Detail
-
items
protected java.util.List<Item> items
list ofItemAdapter
-
-
Method Detail
-
getItems
public java.util.List<Item> getItems()
-
setItems
public void setItems(java.util.List<Item> items)
- Parameters:
items
- the list of items
-
getItemCount
public int getItemCount()
- Specified by:
getItemCount
in classandroidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
- Returns:
- count of the number of ingredients in our list
-
-