Skip to content

Instantly share code, notes, and snippets.

@jackyshan
Last active May 6, 2017 11:04
Show Gist options
  • Save jackyshan/669f1543906f2dda7c73177845a38eba to your computer and use it in GitHub Desktop.
Save jackyshan/669f1543906f2dda7c73177845a38eba to your computer and use it in GitHub Desktop.
activity生命周期
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_table);
}
@Override
protected void onStart() {//开启
super.onStart();
}
@Override
protected void onResume() {//唤醒
super.onResume();
}
@Override
protected void onPause() {//被遮盖,但是可以看到
super.onPause();
}
@Override
protected void onStop() {//完全看不见
super.onStop();
}
@Override
protected void onRestart() {//重新唤醒
super.onRestart();
}
@Override
protected void onDestroy() {//销毁
super.onDestroy();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment