Clear all activities in a task?

后端 未结 7 1562
有刺的猬
有刺的猬 2020-11-30 01:44

I have a splash screen activity, then a login activity. My history stack looks like:

SplashActivity
LoginActivity

when the user successfull

7条回答
  •  旧时难觅i
    2020-11-30 02:03

    finish() removes the activity from the stack. So, if you start LoginActivity and call finish() on SplashActivity, and then you do exact the same to start WelcomeActivity you will get the desired behaviour. No need to use extra flags.

提交回复
热议问题