Life cycle of Android Activity after pressing Back button

AJ.

I am little confused between the life cycle of two activities.

Suppose I have Activity A and Activity B.

B is called From A i.e A ----> B.

Now currently B is on the screen and I pressed back button. Here I want know:- is there any memory still available for B(Active) or B's memory is flushed(Inactive).

Jitesh Upadhyay

Suppose there is an activity A, from which you launch activity B. If, while in activity B, you hit the back button, you are popping activity B off the stack and B will not be in the activity stack any longer.

Whenever you push an activity to the stack, onCreate is called, and if you press back button, onDestroy is called, which means that the activity is flushed away.

stack

Please visit my blog for further information: http://upadhyayjiteshandroid.blogspot.in/2013/02/android-lifecycle.html

activity lifecycle please visit for more

http://developer.android.com/guide/components/tasks-and-back-stack.html

http://developer.android.com/training/basics/activity-lifecycle/starting.html

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

ANDROID: Activity state after pressing the back button

From Dev

Android main activity's elements do not respond after pressing the back button from child activity

From Dev

activity life cycle Android

From Dev

refresh state on going to previous scene in react native from native (android) activity after pressing back button

From Dev

Blank activity or fragment on reopening app after closing by pressing back button

From Dev

Android Activity Life-cycle

From Dev

Android activity go back to activity that started it instead of parent activity when pressing navigation bar back button

From Dev

Android life cycle and home button

From Dev

How to change a value to an Activity after pressing a button in android?

From Dev

Android: app crashes after going back and pressing a button

From Java

Android activity life cycle - what are all these methods for?

From Dev

Android Activity Life Cycle: Problems with Onstop()

From Dev

Android inter-Activity life cycle

From Dev

Prevent form resubmit after pressing back button

From Dev

UISearchBar stays on NavigationController after pressing the back button

From Dev

Not navigating back to list after pressing Create Button

From Dev

Android maintain Activity after clicking back button on FragmentActivity

From Dev

Android Gridview is not refreshed while pressing back button

From Dev

Android runOnUiThread crash when pressing Back button

From Dev

Android Gridview is not refreshed while pressing back button

From Dev

going back to the parent activity on pressing app icon button

From Dev

Avoid splash screen activity when pressing Back button

From Dev

Pressing back button stops app during Camera activity

From Dev

Don't kill Activity when pressing back button

From Dev

How to go to root activity from any fragment by pressing back button?

From Dev

going back to the parent activity on pressing app icon button

From Dev

How to go to root activity from any fragment by pressing back button?

From Dev

Android - Activity Hierarchy (back button)

From Dev

Android Back Button to specific activity

Related Related

  1. 1

    ANDROID: Activity state after pressing the back button

  2. 2

    Android main activity's elements do not respond after pressing the back button from child activity

  3. 3

    activity life cycle Android

  4. 4

    refresh state on going to previous scene in react native from native (android) activity after pressing back button

  5. 5

    Blank activity or fragment on reopening app after closing by pressing back button

  6. 6

    Android Activity Life-cycle

  7. 7

    Android activity go back to activity that started it instead of parent activity when pressing navigation bar back button

  8. 8

    Android life cycle and home button

  9. 9

    How to change a value to an Activity after pressing a button in android?

  10. 10

    Android: app crashes after going back and pressing a button

  11. 11

    Android activity life cycle - what are all these methods for?

  12. 12

    Android Activity Life Cycle: Problems with Onstop()

  13. 13

    Android inter-Activity life cycle

  14. 14

    Prevent form resubmit after pressing back button

  15. 15

    UISearchBar stays on NavigationController after pressing the back button

  16. 16

    Not navigating back to list after pressing Create Button

  17. 17

    Android maintain Activity after clicking back button on FragmentActivity

  18. 18

    Android Gridview is not refreshed while pressing back button

  19. 19

    Android runOnUiThread crash when pressing Back button

  20. 20

    Android Gridview is not refreshed while pressing back button

  21. 21

    going back to the parent activity on pressing app icon button

  22. 22

    Avoid splash screen activity when pressing Back button

  23. 23

    Pressing back button stops app during Camera activity

  24. 24

    Don't kill Activity when pressing back button

  25. 25

    How to go to root activity from any fragment by pressing back button?

  26. 26

    going back to the parent activity on pressing app icon button

  27. 27

    How to go to root activity from any fragment by pressing back button?

  28. 28

    Android - Activity Hierarchy (back button)

  29. 29

    Android Back Button to specific activity

HotTag

Archive