Learn How to Enable Up Navigation Button in Your App

In one of the earlier article you have seen how the back button works. The user can navigate through activity history by the back button click.

The up button is different. It allows you to traverse through the Activity hierarchy.

Let’s say you have MainActivity. From MainActivity you navigate to DetailActivity. Now if you have declared MainActivity to be a parent of DetailActivity then you can navigate back to it using an up button.

To illustrate this I have added a DetailActivity to the ThemeDemoApp, as shown in the video.

Please follow the video to understand this better and you can refer to the source code for the example App here.

Author: Ankur

I am Enthusiastic about Learning new things and sharing my Knowledge. I like programming and have a pretty good background in Computer Science.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: