public class IngredientRecyclerAdapter.EditIngredientViewHolder extends RecyclerView.ViewHolder
itemView
Constructor and Description |
---|
EditIngredientViewHolder(com.semartinez.projects.choppit.databinding.ItemEditIngredientBinding binding)
The ViewHolder constructor attaches a
View to each binding. |
Modifier and Type | Method and Description |
---|---|
void |
bind(Ingredient ingredient)
This method attaches a specific
Ingredient to a specific entry in the active Fragment
and attaches a reference to the EditingFragment to handle user input. |
getAdapterPosition, getItemId, getItemViewType, getLayoutPosition, getOldPosition, getPosition, isRecyclable, setIsRecyclable, toString
public EditIngredientViewHolder(com.semartinez.projects.choppit.databinding.ItemEditIngredientBinding binding)
View
to each binding.binding
- is the connection between the data and the interface.public void bind(Ingredient ingredient)
Ingredient
to a specific entry in the active Fragment
and attaches a reference to the EditingFragment to handle user input.ingredient
- the item to be bound.