Removing an activity from the history stack

后端 未结 15 1142
[愿得一人]
[愿得一人] 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 08:48

    I use this way.

    Intent i = new Intent(MyOldActivity.this, MyNewActivity.class);
    i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
    startActivity(i);
    

提交回复
热议问题