July 2015
Beginner to intermediate
600 pages
18h 59m
English
So far, each of your list items only displays the title of a Crime using a simple TextView.
What do you do when you want to display more information in each list item? What if you want to customize the design of each list item? Moving your item view to a separate layout file will allow you to do both of these things while also cleaning up the code.
For CriminalIntent, a list item’s layout should include the crime’s title, its date, and whether the case has been solved (Figure 9.10). This layout calls for two TextViews and a CheckBox.
Figure 9.10 A handful of custom list items
You create a new layout for a list item view the same way you do for the view of ...
Read now
Unlock full access