[英]Keep unique activities around after swiping one activity off recent app list
I have two activities in an application I am creating. 我正在创建的应用程序中有两个活动。 I have both activities set up to use their own process.
我将两个活动都设置为使用自己的流程。 The two activities use the
singleTask
android:launchMode
, a unique android:process
value, and a unique android:taskAffinity
value. 这两个活动使用
singleTask
android:launchMode
,唯一的android:process
值和唯一的android:taskAffinity
值。
When I have both activities running, they both show in the recent apps list, and are using unique processes. 当我同时运行两个活动时,它们都显示在最近的应用程序列表中,并且正在使用唯一的流程。
When I swipe either activity, it also kills the process of the other activity. 当我刷任何一个活动时,它也会杀死另一个活动的过程。
Is there a way to prevent this action? 有什么办法可以防止这种情况发生? I want the swipe to remove ONLY the activity I was actually swiping.
我只希望刷卡删除我实际刷卡的活动。
Thank you for any help! 感谢您的任何帮助!
It appears that this is the correct behavior, although undefined officially. 似乎这是正确的行为,尽管尚未正式定义。
Swiping any activity off of the recent apps list will also close any other activities open that are associated with the application. 从最近的应用程序列表中清除任何活动也将关闭与该应用程序关联的所有其他打开的活动。 Services will be kept running, but are notified that the associated activities have been closed.
服务将保持运行状态,但是会通知相关活动已关闭。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.