Android Programming: The Big Nerd Ranch Guide, 2nd Edition
by Bill Phillips, Chris Stewart, Brian Hardy, Kristin Marsicano
Enabling Hierarchical Navigation
So far, CriminalIntent relies heavily on the Back button to navigate around the app. Using the Back button is temporal navigation. It takes you to where you were last. Hierarchical navigation, on the other hand, takes you up the app hierarchy. (It is sometimes called ancestral navigation.)
In hierarchical navigation, the user navigates up by pressing the Up button on the left side of the toolbar. Prior to Jelly Bean (API level 16), developers had to manually show the Up button and manually handle presses on the Up button. As of Jelly Bean, there is a much easier way to add this functionality.
Enable hierarchical navigation in CriminalIntent by adding a parentActivityName attribute in the AndroidManifest.xml ...
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