Android 应用程序当前活动带来的前沿问题 [英] Android application current activity bring to front issue
问题描述
我有一个基本问题,我认为附加任何代码片段都无济于事.当我们在应用程序位于前面时按下主页按钮时,我们会转到主页,应用程序失去焦点.
I have a basic question for which I don't think attaching any code-snippet may help. When we press home button while an app is in front we go to the home page and the app loses its focus.
现在,我的应用程序必须在状态栏中有通知图标.和我的应用程序一样,有可能有 2-3 个活动可见(在对话视图中一个在另一个之上).在某些情况下,当我按下状态栏中的通知图标时,我不确定如何恢复这种状态.
Now, My application has to have notification icon in the status bar. And as in my application, there is a possibility of having 2-3 activity visible(one above another in dialogue view). In certain situation, I am not really sure as to how could I resume such state when I press notification icon in the status bar.
但是,当我按下主页按钮,然后按下主屏幕中的应用程序图标时,我得到了预期的一切.
But, when I press home button and then press the application icon in the home screen I get everything as expected.
那么,有什么办法可以让我对通知栏图标做同样的事情.
So, is there any way, by which I can do the same with notification bar icon.
推荐答案
有两种方法:
这篇关于Android 应用程序当前活动带来的前沿问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!