Save activity state in android when home button pressed

前端 未结 2 1212
忘掉有多难
忘掉有多难 2020-12-17 06:58

I am having an issue related to the home key. When I press the home key the current activity gets hidden, but when I start the executable again, it starts at the first scree

2条回答
  •  暖寄归人
    2020-12-17 07:30

    From what have you described you probably have overridden android:launchMode in AndroidManifest.xml or if you are testing by "run as" from Eclipse try exiting the application after installing and auto-starting. Then start again from the emulator and test the Home button behavior. I suppose this is because Android does not put Activities on the OS stack when started from Eclipse and then the Home button behavior is not as usual. If this does not solve your problem, try reading http://developer.android.com/guide/topics/fundamentals.html#lmodes.

    I hope this will help.

提交回复
热议问题