开发者

Launching activity from the status bar creates new activity even when one already exists

I have an activity that starts a long-running service which in turn adds an icon to the status bar. When t开发者_StackOverflow中文版he activity gets invisible, e.g. by pressing the Home button, and the pressing the icon in the status bar a new activity is created instead of showing the already created activity. If you now press the back button the new activity is destroyed and the activity created in the first place gets visible. How do I make the invisible activity brought to front when pressing the icon in the status bar instead of creating a new activity? Thanks, Christian


Check out the launchMode attribute for the tag in your AndroidManifest.xml.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜