Adding and Interacting with RecyclerView
In this chapter, you will learn how to add lists and grids of items to your apps and effectively leverage the recycling power of RecyclerView
. You’ll also learn how to handle user interaction with the item views on the screen and support different item view types – for example, for titles. Later in the chapter, you’ll add and remove items dynamically.
By the end of the chapter, you will have the skills required to present your users with interactive lists of rich items.
In the previous chapter, we learned how to fetch data, including lists of items and image URLs, from APIs, and how to load images from URLs. Combining that knowledge with the ability to display lists of items is the goal of this chapter.
Quite often, you will want to present your users with a list of items. For example, you might want to show them a list of pictures on their device or let them select their country from a list of all countries. To...