Android Up button vs back button code example
Example: back button android studio
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />