I have a login screen, after successful login, a tab will load with 4 tab activities.
=>
Step 1:
You should finish login
activity while starting up tab activity.
For example:
Intent intent = new Intent(this, MyTabActivity.class);
startActivity(intent);
finish();
Step 2:
Now, if you call finish()
inside onBackPressed()
of your tab activity then it will come out from your app.
@Override
public void onBackPressed() {
super.onBackPressed();
finish();
}