Adapter class is a helper to
RecyclerView. It has three responsibilities: To return how many items should be in RecyclerView, inflate item views from XML and return new ViewHolder instance(object). and populate them with appropriate data(Basically, everything is in this order). So, it has (constructor and) three methods:
public MyAdapter(int numberOfItems, ListItemClickListener onClickListener)
where ListItemClickListener is an interface, which has one
void methoid defined,
This method inflates item XML and wraps it into ViewHolder.
This method binds/populates view with data. I also have to mention that
ViewHolder class must contain
void bind(params), which is then called inside
This method returns number of items from data source.