9 Displaying Lists with RecyclerView

CriminalIntent’s model layer currently consists of a single instance of Crime. In this chapter, you will update CriminalIntent to work with a list of crimes. The list will display each Crime’s title and date, as shown in Figure 9.1.

Figure 9.1  A list of crimes

A list of crimes

Figure 9.2 shows the overall plan for CriminalIntent in this chapter.

Figure 9.2  CriminalIntent with a list of crimes

CriminalIntent with a list of crimes

In the controller layer, you have a new ViewModel that will encapsulate the data for the new screen. ...

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.