@Override
protected void onStart()
{
super.onStart();
Log.e("test", "on start");
}
@Override
protected void onRestart()
{
super.onStart();
Log.e("test", "on restart");
}
@Override
protected void onStop()
{
super.onStop();
Log.e("test", "on stop");
}
@Override
protected void onPause()
{
super.onPause();
Log.e("test", "on pause");
}
@Override
protected void onDestroy()
{
super.onDestroy();
Log.e("test", "on destroy");
}
通过覆盖父类的接口,查看Activity在不同的情况下的生存情况,如果不调用父类的接口,屏幕一闪而过,立刻退出