Class IngredientDetailAdapter


  • public class IngredientDetailAdapter
    extends ItemAdapter<Ingredient>
    ItemDetailAdapter is the adapter for the item detail recycler view
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  IngredientDetailAdapter.ViewHolder
      ViewHolder is the view holder for the item detail recycler view
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onBindViewHolder​(androidx.recyclerview.widget.RecyclerView.ViewHolder holder, int position)
      onBindViewHolder binds the view to the data
      androidx.recyclerview.widget.RecyclerView.ViewHolder onCreateViewHolder​(android.view.ViewGroup parent, int viewType)
      onCreatedViewHolder inflates the view
      • 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, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserver
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IngredientDetailAdapter

        public IngredientDetailAdapter()
    • Method Detail

      • onCreateViewHolder

        @NonNull
        public androidx.recyclerview.widget.RecyclerView.ViewHolder onCreateViewHolder​(@NonNull
                                                                                       android.view.ViewGroup parent,
                                                                                       int viewType)
        onCreatedViewHolder inflates the view
        Specified by:
        onCreateViewHolder in class androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
        Parameters:
        parent - activity that handles the ingredients
        viewType - view type
        Returns:
        the view holder
      • onBindViewHolder

        public void onBindViewHolder​(@NonNull
                                     androidx.recyclerview.widget.RecyclerView.ViewHolder holder,
                                     int position)
        onBindViewHolder binds the view to the data
        Specified by:
        onBindViewHolder in class androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
        Parameters:
        holder - the view holder
        position - the position of the item