一,android 四大组件
Activity、Service、BroadcastReceiver 、ContentProvider
二,Activity 生命周期
三,横竖屏切换时的生命周期
1、新建一个 Activity,并把各个生命周期打印出来
2、运行 Activity,得到如下信息
10-23 02:35:54.261: INFO/chenys(4385): onCreate-->
10-23 02:35:54.271: INFO/chenys(4385): onStart-->
10-23 02:35:54.286: INFO/chenys(4385): onResume-->
3、按 crtl+f12切换成横屏时
10-23 02:36:58.331: INFO/chenys(4385): onSaveInstanceState-->
10-23 02:36:58.411: INFO/chenys(4385): onPause-->
10-23 02:36:58.462: INFO/chenys(4385): onStop-->
10-23 02:36:58.481: INFO/chenys(4385): onDestroy-->