O'Reilly logo

Android Programming: The Big Nerd Ranch Guide by Brian Hardy, Bill Phillips

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

Enabling Ancestral 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. Ancestral navigation, on the other hand, takes you up the app hierarchy. (It is sometimes called hierarchical navigation.)

Android makes it easy to use the app icon on the action bar for ancestral navigation. You can implement it to go “home” – all the way up the hierarchy to the app’s initial screen. In fact, the icon was originally called the app’s Home button. However, Android now recommends that you implement the app icon to go up just one level to the parent of the current activity. When you do this, the icon becomes the Up button.

In ...

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