安卓活动的$ P $后生命周期pssing后退按钮生命周期、按钮、pssing

2023-09-07 08:59:02 作者:\↘心不够坚定

我是两个活动的生命周期之间有点糊涂了。

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

假设我有活动A和b活动。

Suppose I have Activity A and Activity B.

B称为从即 A ---->乙

现在目前 B 是在屏幕上,我pressed后退按钮。在这里,我想知道: - 没有任何记忆仍然可用于 B (活动)或 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).

它我对Android的第三个星期。

Its my third week on android.

推荐答案

假设有活性的,比你跟活动B和比你会打的后退按钮比它意味着你弹出堆栈和B不会再出现在活动的堆栈。

suppose there is an activity A and than you come with activity B and than if you will hit the back button than it means you are popping up the stack and B will not be there anymore in the activity stack .

当你正在推​​动的活动,以堆叠方式的onCreate 会打电话,如果你preSS后退按钮,的onDestroy 将被调用,这意味着活动冲走。

whenever you are pushing an activity to stack means onCreate will call and if you press back button, onDestroy will be called which means that activity is flushed away.

请访问我的博客

http://upadhyayjiteshandroid.blogspot.in/2013/02/android-lifecycle.html

请访问更多的

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