Removing an activity from the history stack

后端 未结 15 975
[愿得一人]
[愿得一人] 2020-11-22 08:28

My app shows a signup activity the first time the user runs the app, looks like:

  1. ActivitySplashScreen (welcome to game, sign up for an account?)
  2. Activ
15条回答
  •  囚心锁ツ
    2020-11-22 09:04

    Just call this.finish() before startActivity(intent) like this-

           Intent intent = new Intent(ActivityOne.this, ActivityTwo.class);
            this.finish();
            startActivity(intent);
    

提交回复
热议问题