English subtitles

← Create New Activity - Developing Android Apps

Get Embed Code
10 Languages

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

  1. You're going to use Android Studio
    to create the DetailActivity
  2. from the Blank Activity
    with Fragment template.
  3. The template asks for the
    hierarchical parent of DetailActivity,
  4. which defines the UP button
    noted by the app icon,
  5. and a left-pointing carat here.
  6. But what does "up" mean?
  7. If you mapped out a hierarchy
    of all screens in the Sunshine app,
  8. the root of the tree
    would be the MainActivity,
  9. and it's child would be
    the DetailActivity.
  10. So, the UP goes to the MainActivity.
  11. While the BACK button
    can achieve the same effect,
  12. it can also bring you back home,
    or to another app,
  13. depending on your history of screens.
  14. UP will always navigate you
    within the same app to the parent,
  15. regardless of how
    you arrived at this screen.
  16. Create the detail activity now,
  17. and look at how the activity is declared
    in the Android manifest file.