UsersListAdapter¶
-
public class
UsersListAdapter
extends RecyclerView.Adapter<UsersListAdapter.ViewHolder>¶ This Adapter is used for viewing the subscribed users of a network.
Constructors¶
Methods¶
getItemCount¶
-
public int
getItemCount
()¶ Get the number of items in the list of objects to display
Returns: Number of items in list to display
getUsers¶
onBindViewHolder¶
-
public void
onBindViewHolder
(ViewHolder holder, int position)¶ Fill the name and profile picture fields of
holder
with the contents of an item inUsersListAdapter.users
.Parameters: - holder –
ViewHolder
whose fields to fill with information - position – Index of item in list of users to use as source of information for filling
- holder –
onCreateViewHolder¶
-
public ViewHolder
onCreateViewHolder
(ViewGroup parent, int viewType)¶ Create a new
UsersListAdapter.ViewHolder
from aView
inflated fromR.layout.user_list_item
and with parentparent
Parameters: - parent – Parent for the
View
used to create the newUsersListAdapter
- viewType – Not used.
Returns: The created
UsersListAdapter.ViewHolder
- parent – Parent for the