July 2018
Intermediate to advanced
266 pages
7h 11m
English
For our adapter to work, it needs to know how to create a ViewHolder and how to replace its contents, and it needs to be able to return the amount of elements that it currently has. The first step is to extend RecyclerView.Adapter using our own ViewHolder as the type:
class ArticleAdapter : RecyclerView.Adapter<ArticleAdapter.ViewHolder>() { ...}
Once this is done, we will be requested to implement three functions:
Read now
Unlock full access