Create the Layout
A complex list relies on the ListView
widget, but also requires a custom list item layout. The list item layout is a layout like any other layout. However, it is organized so that it displays important information from one of the items in the underlying data source. It typically contains significantly fewer widgets than an activity’s layout and is organized in a rowlike manner. There are several steps you need to take to create the list item layout for this chapter.
1. Add some colors to the color.xml value file. Use #ff0000
as the value for the color named system_red, #ffffff
as the value for the color named system_white and #0000ff
for the color named system_blue. Save the file.
2. Create a new XML layout file by right-clicking ...
Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.