January 2017
Beginner to intermediate
624 pages
22h 42m
English
Now, you want CrimeListFragment to display a list of crimes to the user. To do this, you will use a RecyclerView.
RecyclerView is a subclass of ViewGroup. It displays a list of child View objects, one for each item in your list of items. Depending on the complexity of what you need to display, these child Views can be complex or very simple.
For your first implementation, each item in the list will display the title and date of a Crime. The View object on each row will be a LinearLayout containing two TextViews, as shown in Figure 8.4.
Figure 8.4 A RecyclerView with child Views
Read now
Unlock full access