Adding a settings page to the Note To Self app
Now that we are armed with all this knowledge about Android Intents, we can add another screen (Activity) to our Note To Self app.
We will first create a new Activity and see what effect that has on the AndroidManifest.xml
file. We will then create a layout for our Settings screen and add the Java code to switch from MainActivity
to the new one. We will, however, defer wiring up our settings screen with Java until we have learned how to save those settings to disk. We will do this later in this chapter and then come back to the settings screen to make the data persist.
First, let's create that new Activity.
Creating SettingsActivity
This will be a screen where the user can turn on or off the sound effects ...
Get Android Programming for Beginners 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.