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

Get Android Programming: The Big Nerd Ranch Guide, 2nd Edition 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.