Now that you have a way to get contact data, the next step is to modify the activity_contact_list.xml file to include a
ListView widget. Open this file and delete the HelloWorld TextView if you have not already done so (see creating the layout in the “Using Preferences” section of Chapter 5, “Persistent Data in Android”). Also add the navigation bar if you haven’t done that. Be sure to delete the
paddingLeft, attributes, and the like in the root
RelativeLayout. In Graphical Layout, from the Composite folder in the Palette, drag a
ListView to anywhere on the layout. Switch to activity_contact_list.xml and modify the XML for the
ListView widget to match Listing 6.2.