public class ReportAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<ReportViewHolder>
Constructor and Description |
---|
ReportAdapter(android.app.Activity context,
java.util.List<Report> list,
androidx.fragment.app.Fragment fragment)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getItemCount()
Return the length of the JSON array passed into the ReviewAdapter.
|
void |
onBindViewHolder(ReportViewHolder holder,
int position) |
ReportViewHolder |
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 ReportAdapter(android.app.Activity context, java.util.List<Report> list, androidx.fragment.app.Fragment fragment)
context
- The parent Context.list
- The list of reports to be shown.@NonNull public ReportViewHolder onCreateViewHolder(@NonNull android.view.ViewGroup parent, int viewType)
onCreateViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<ReportViewHolder>
RecyclerView.Adapter.onCreateViewHolder(ViewGroup, int)
public void onBindViewHolder(@NonNull ReportViewHolder holder, int position)
onBindViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<ReportViewHolder>
RecyclerView.Adapter.onBindViewHolder(RecyclerView.ViewHolder,
int)
public int getItemCount()
getItemCount
in class androidx.recyclerview.widget.RecyclerView.Adapter<ReportViewHolder>