Articles → ANDROID → Back button in android

Back button in android






Example














public void Navigate(View view) {
    Intent i = new Intent(getApplicationContext(), SecondActivity.class);
    startActivity(i);
}




<activity android:name=".SecondActivity" android:parentActivityName=".MainActivity" >
	<meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity"></meta-data>
</activity>





Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, November 28, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250