简体   繁体   English

使用Android TaskManager将活动置于最前面

[英]Bring an Activity to the front using Android TaskManager

I am running into an issue with bring up an Activity to the front. 我在将“ Activity调到最前面时遇到问题。

  1. When the app is launched the user sets some time (Activity 1) 启动应用程序后,用户需要设置一些时间(活动1)
  2. Now the app shows a count down time with time decreasing (Activity 2) 现在,该应用程序显示了倒数时间,时间随着时间的推移而减少(活动2)
  3. Now I press the home button. 现在,我按下主页按钮。
  4. 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. 选择任务管理器,选择列表中显示的我的应用程序,然后选择“切换到”将应用程序显示在最前面,而不是活动2,它最终出现在活动屏幕1上。

What can I do so the task manager switches to the most recent Activity ? 我该怎么办才能使任务管理器切换到最近的Activity

确保在启动活动2时未使用FLAG_NEW_TASK。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM