5.9. AndroidManifest.xml
Each Activity in an app must be declared in the app’s AndroidManifest.xml file; otherwise, Android will not know that the Activity exists and will not be able to launch it. When you created the app, the IDE declared its MainActivity in AndroidManifest.xml. To declare the app’s SettingsActivity:
1. Open AndroidManifest.xml and click the Application tab at the bottom of the manifest editor.
2. In the Application Nodes section, click Add..., select Activity from the dialog that appears and click OK.
3. In the Application Nodes section, select the new Activity node to display its attributes in the Attributes for Activity section.
4. In the Name field, enter .SettingsActivity. The dot (.) before SettingsActivity is shorthand ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access