English subtitles

← Launch SettingsActivity - Developing Android Apps

Get Embed Code
10 Languages

Showing Revision 16 created 05/25/2016 by Udacity Robot.

  1. In order to launch the SettingsActivity,
    we modify Mainactivity.java
  2. in the On options item selected method.
  3. When the Settings Menu Item
    is selected, we create
  4. a new, explicit intent
    to the SettingsActivity Class.
  5. We call Start activity
    to launch this intent.
  6. We don't call StartActivity for results
    because we're not expecting
  7. a result from the SettingsActivity.
    Similarly, in the detail activity class,
  8. when the settings menu is selected,
    we launch a new intent
  9. to SettingsActivity.