安卓入门
十、组件学习
1、Activity
- activity跳转
// 按钮点击事件
public void openActivity(View view) {
startActivity(new Intent(this, MainActivity2.class));
}
- activity生命周期
onCreate(->onRestart)->onStart->onResume->onPause->onStop->onDestroy
2、Service
3、Receiver