public class ReservationAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<ReservationViewHolder>
Constructor and Description |
---|
ReservationAdapter(android.content.Context context,
java.util.List<Reservation> list,
androidx.fragment.app.Fragment fragment)
Constructor.
|
ReservationAdapter(android.content.Context context,
java.util.List<Reservation> list,
androidx.fragment.app.Fragment fragment,
int layout)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getItemCount()
Return the length of the JSON array passed into the ReviewAdapter.
|
void |
onBindViewHolder(ReservationViewHolder holder,
int position) |
ReservationViewHolder |
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 ReservationAdapter(android.content.Context context, java.util.List<Reservation> list, @Nullable androidx.fragment.app.Fragment fragment)
context
- The parent Context.list
- The array of JSON Objects got from server.fragment
- A Fragment.public ReservationAdapter(android.content.Context context, java.util.List<Reservation> list, @Nullable androidx.fragment.app.Fragment fragment, int layout)
context
- The parent Context.list
- The array of JSON Objects got from server.fragment
- A Fragment.layout
- The layout for the item.@NonNull public ReservationViewHolder onCreateViewHolder(@NonNull android.view.ViewGroup parent, int viewType)
onCreateViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<ReservationViewHolder>
RecyclerView.Adapter.onCreateViewHolder(ViewGroup, int)
public void onBindViewHolder(@NonNull ReservationViewHolder holder, int position)
onBindViewHolder
in class androidx.recyclerview.widget.RecyclerView.Adapter<ReservationViewHolder>
RecyclerView.Adapter.onBindViewHolder(RecyclerView.ViewHolder,
int)
public int getItemCount()
getItemCount
in class androidx.recyclerview.widget.RecyclerView.Adapter<ReservationViewHolder>