Set ContactListActivity as the Default Activity

The third task is to modify the AndroidManifest.xml file to open the ContactListActivity instead of the ContactActivity as the initial app activity. Open AndroidManifest.xml by double-clicking it in the Package Explorer. Switch to the XML view if it is not already open. Find the code that matches Listing 6.18 and switch the name and label attributes so that the activity with the intent filter is ContactListActivity and its label, and the other activity has the name ContactActivity and its label. To do this, delete the strikeout lines (these are the original lines) in Listing 6.19 and add the new lines.

Listing 6.19 Changing the Launch Activity

<activity    android:name ...

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.