Android - How to start the exact same activity every time the app is opened up?

前端 未结 4 1754
南笙
南笙 2020-12-22 02:38

In a nutshell, to give you an example, I basically have an app with 3 activities: Activity1 Activity2 StartActivity

StartActivity contains two buttons that correspon

4条回答
  •  无人及你
    2020-12-22 02:57

    I would think the solution to be destroying Activity1 and Activity2 onStop. This leaves the stack with only your StartActivity. You can call the finish method in Activity to terminate it programmatically at anytime.

提交回复
热议问题