开发者

Activity: from home screen launch or back from the stack

开发者 https://www.devze.com 2022-12-27 21:21 出处:网络
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?

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

精彩评论

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

关注公众号