安卓Activity生命周期(转)

http://www.oschina.net/question/54100_27841

安卓Activity生命周期(转)

启动:onCreate()->onStart()->onResume

当从Activity界面直接按Back键,onPause()->onStop()->onDestory()

当从Activity界面按home键。onPause()->onStop(),

接着再进入Activity时onRestart()->onStart()->onResume()

public class Activity extends ApplicationContext {
        protected void onCreate(Bundle savedInstanceState);        
        protected void onStart();           
        protected void onRestart();        
        protected void onResume();       
        protected void onPause();        
        protected void onStop();        
        protected void onDestroy();
}

 

 

安卓Activity生命周期(转),布布扣,bubuko.com

安卓Activity生命周期(转)

上一篇:Android中socket初体验


下一篇:赵雅智_android_frame动画