使用 Android TaskManager 将 Activity 置于前台
我遇到了将 Activity
放在前面的问题。
- 当应用程序启动时,用户设置一些时间(活动 1)
- 现在应用程序显示倒计时时间随着时间的减少(活动 2)
- 现在我按下主页按钮。
- 选择任务管理器,选择列表中显示的我的应用程序,然后选择“切换到”将应用程序置于最前面,而不是活动 2,它最终出现在活动屏幕 1 上。
我该怎么做才能使任务管理器切换到最前面最近的活动
?
I am running into an issue with bring up an Activity
to the front.
- When the app is launched the user sets some time (Activity 1)
- Now the app shows a count down time with time decreasing (Activity 2)
- Now I press the home button.
- Choose Task Manager, select my app shown in the list and select "Switch To" to bring the app to the front, instead of Activity 2 it ends up on the Activity Screen 1.
What can I do so the task manager switches to the most recent Activity
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保启动 Activity 2 时没有使用 FLAG_NEW_TASK。
Make sure you are not using FLAG_NEW_TASK when launching Activity 2.