You should have at-least two activities.
- Parent activity from which another activity is getting displayed.
- Another activity which is shown from parent activity.
- Login activity = Parent activity =
- Forgot Password activity = Child activity =
How to set up?
- Locate child activity, in my case it is
ForgotPasswordActivity& replace it as follows.
<activity android:name=".LoginActivity" /> <activity android:name=".ForgotPasswordActivity"> <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".LoginActivity" /> </activity>