O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required