public class ReviewAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<ReviewViewHolder>
Constructor and Description |
---|
ReviewAdapter(android.content.Context context,
java.util.List<? extends Review> list)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getItemCount()
Return the length of the JSON array passed into the ReviewAdapter.
|
void |
onBindViewHolder(ReviewViewHolder holder,
int position) |
ReviewViewHolder |
onCreateViewHolder(android.view.ViewGroup parent,
int viewType) |
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
public ReviewAdapter(android.content.Context context, java.util.List<? extends Review> list)
context
- The parent Context.list
- The list of reviews to be displayed.@NonNull public ReviewViewHolder onCreateViewHolder(@NonNull android.view.ViewGroup parent, int viewType)
onCreateViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<ReviewViewHolder>
public void onBindViewHolder(@NonNull ReviewViewHolder holder, int position)
onBindViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<ReviewViewHolder>
public int getItemCount()
getItemCount
in class androidx.recyclerview.widget.RecyclerView.Adapter<ReviewViewHolder>