安卓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)