package com.xdw.a122;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
public class LifeCycleActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_life_cycle);
Log.d("LifeRecycle","onStart");
}
@Override
protected void onStart() {
super.onStart();
Log.d("LifeRecycle","onStart");
}
@Override
protected void onResume() {
super.onResume();
Log.d("LifeRecycle","onResume");
}
@Override
protected void onPause() {
super.onPause();
Log.d("LifeRecycle","onPause");
}
@Override
protected void onStop() {
super.onStop();
Log.d("LifeRecycle","onStop");
}
@Override
protected void onRestart() { //重启
super.onRestart();
Log.d("LifeRecycle","onRestart");
}
@Override
protected void onDestroy() { //结束
super.onDestroy();
Log.d("LifeRecycle","onDestroy");
}
}