Adapter to map the information

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.adapter

import co.starcarr.rssreader.model.Article

class ArticleAdapter {
val articles: MutableList<Article> = mutableListOf()
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.194.123