July 2018
Intermediate to advanced
266 pages
7h 11m
English
In order to map an Article into an element of a RecyclerView, we will need to create an Adapter. Let's create the package co.starcarr.rssreader.adapter and add the class ArticleAdapter to it:

To start, let's simply add a private list of articles to the adapter. We will add articles to it as we fetch them:
package co.starcarr.rssreader.adapterimport co.starcarr.rssreader.model.Articleclass ArticleAdapter { val articles: MutableList<Article> = mutableListOf()}
Read now
Unlock full access