package com.hanqi.text3; import android.app.Activity;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.util.Log; /**
* Created by Administrator on 2016/3/16.
*/
//回调方法
public class Activity2 extends Activity { @Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //
setContentView(R.layout.activity2); System.out.println("这是我运行的第一个Activity"); Log.e("TAG","######创建"); }
@Override
protected void onStart(){
super.onStart(); Log.e("ATG","######启动"); }
@Override
protected void onResume(){
super.onResume();
Log.e("ATG", "######显示");
} @Override
protected void onPause(){
super.onPause();
Log.e("ATG", "######暂停");
}
@Override
protected void onStop(){
super.onStop();
Log.e("ATG", "######停止");
}
@Override
protected void onRestart(){
super.onRestart();
Log.e("ATG", "######重新启动");
}
@Override
protected void onDestroy(){
super.onDestroy();
Log.e("ATG", "######销毁");
}
}