O'Reilly logo

Android Programming for Beginners by John Horton

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

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

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