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