Class StorageIngredientAdapter.ViewHolder

  • Enclosing class:
    StorageIngredientAdapter

    public static class StorageIngredientAdapter.ViewHolder
    extends androidx.recyclerview.widget.RecyclerView.ViewHolder
    The view holder class for the storage ingredient list.
    • Field Summary

      • Fields inherited from class androidx.recyclerview.widget.RecyclerView.ViewHolder

        itemView
    • Constructor Summary

      Constructors 
      Constructor Description
      ViewHolder​(android.view.View view)
      The constructor for the view holder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(StorageIngredient storageIngredient, OnItemClickListener<StorageIngredient> listener)
      Bind the storage ingredient to the view holder.
      • Methods inherited from class androidx.recyclerview.widget.RecyclerView.ViewHolder

        getAdapterPosition, getItemId, getItemViewType, getLayoutPosition, getOldPosition, getPosition, isRecyclable, setIsRecyclable, toString
      • Methods inherited from class java.lang.Object

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

      • ViewHolder

        public ViewHolder​(android.view.View view)
        The constructor for the view holder.
        Parameters:
        view - the view to hold the data
    • Method Detail

      • bind

        public void bind​(StorageIngredient storageIngredient,
                         OnItemClickListener<StorageIngredient> listener)
        Bind the storage ingredient to the view holder.
        Parameters:
        storageIngredient - the storage ingredient to bind
        listener - the listener to set for the view holder