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