Adding navigation between two activities

We always have different activities in our application and they are not present in home screen , so we have to provide navigation  between our apps , so the user can return to the desired screen.

We need to create a logical pattern in AndroidMainfest.xml file. So to open this file go to app>mainfest>AndroidMainfest.xml , now go to activity tag for

SecondActivity (your secondary activity) and add this code

<activity android:name=".SecondActivity"
          android:parentActivityName=".MainActivity" >
        android:value=".MainActivity" />

Now Android system will add navigation button automatically in you app.

About kaushal97

Android Enthusiast

Leave a Reply

Your email address will not be published. Required fields are marked *