Closing several android activities simultaneously

前端 未结 2 462
旧巷少年郎
旧巷少年郎 2020-12-09 06:25

In my application you can navigate through several Activities until the Activity stack is quite deep.

We\'d like a button on every Activity that will take you straig

2条回答
  •  被撕碎了的回忆
    2020-12-09 07:19

    You could declare that first activity android:launchMode="singleTask" (more) and then just start it with an Intent.

    EDIT: My suggestion is based on the assumption that you want to have a single instance of the Activity to return to. Otherwise it's incorrect.

提交回复
热议问题