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.
精彩评论