Home key press behaviour

前端 未结 8 1669
北恋
北恋 2020-12-03 08:36

While developing a sample android application i have constructed two activities 1)Activity 1 2)Activity 2

Now Activity 2 is the foreground activity whereas Activity

8条回答
  •  感动是毒
    2020-12-03 08:52

    Does the platform maintain any history entry when pressed home key?

    Yes. Activities when launched/finished are pushed/pop'd onto/from a History Stack.

    How do we take the user to the last launch activity on relaunching the application?

    AFAICT, that should be the default behavior. When you relaunch your application you are taken to the last Activity on the stack unless you alter the stack.

    Read this for details: Application Fundamentals - Activities and Tasks

提交回复
热议问题