本文共 790 字,大约阅读时间需要 2 分钟。
public class MainActivity extends Activity { private static final String TAG = "MainActivity"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.i(TAG, "oncreate"); } @Override protected void onStart() { Log.i(TAG, "onstate"); super.onStart(); } @Override protected void onResume() { Log.i(TAG, "onresume"); super.onResume(); } @Override protected void onPause() { Log.i(TAG, "onpause"); super.onPause(); } @Override protected void onStop() { Log.i(TAG, "onstop"); super.onStop(); } @Override protected void onDestroy() { Log.i(TAG, "ondestroy"); super.onDestroy(); } @Override protected void onRestart() { Log.i(TAG, "onrestart"); super.onRestart(); } } |
转载于:https://blog.51cto.com/9882931/1613424