开发者

Activity: from home screen launch or back from the stack

How can I determin开发者_JS百科e if my main/launcher activity has been invoked from the home screen or by backing up the activity stack?

I display a splash screen and would only like to show it when a user has arrived there from the home screen.


Make the splash screen be a separate activity. Have it be the one you have in the LAUNCHER category. And, when it advances to your next activity, have it finish() so it is no longer on the stack. Then, the only way the splash screen should be seen is if your program in not already running and Android starts from scratch.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜