android知识点大全,android基本知识点总结.doc

android基本知识点总结

一,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-->10-23 02:36:58.572: INFO/chenys(4385): onCreate-->10-23 02:36:58.622: INFO/chenys(4385): onStart-->10-23 02:36:58.632: INFO/chenys(4385): onRestoreInstanceState-->10-23 02:36:58.642: INFO/chenys(4385): onResume-->4、再按crtl+f12切换成竖屏时,发现打印了两次相同的log10-23 02:38:14.172: INFO/chenys(4385): onSaveInstanceState-->10-23 02:38:14.172: INFO/chenys(4385): onPause-->10-23 02:38:14.172: INFO/chenys(4385): onStop-->10-23 02:38:14.172: INFO/chenys(4385): onDestroy-->10-23 02:38:14.281: INFO/chenys(4385): onCreate-->10-23 02:38:14.301: INFO/chenys(4385): onStart-->10-23 02:38:14.312: INFO/chenys(4385): onRestoreInstanceState-->10-23 02:38:14.331: INFO/chenys(4385): onResume-->10-23 02:38:14.812: INFO/chenys(4385): onSaveInstanceState-->10-23 02:38:14.852: INFO/chenys(4385): onPause-->10-23 02:38:14.861: INFO/chenys(4385): onStop-->10-23 02:38:14.892: INFO/chenys(4385): onDestroy-->10-23 02:38:14.921: INFO/chenys(4385): onCreate-->10-23 02:38:15.021: INFO/chenys(4385): onStart-->10-23 02:38:15.031: INFO/chenys(4385): onRestoreInstanceState-->10-23 02:38:15.111: INFO/chenys(4385): onResume-->5、修改AndroidManifest.xml,把该Activity添加 android:configChanges="orientation",执行步骤310-23 02:42:32.201: INFO/chenys(4875): onSaveInstanceState-->10-23 02:42:32.232: INFO/chenys(4875): onPause-->10-23 02:42:32.301: INFO/chenys(4875): onStop-->10-23 02:42:32.311: INFO/chenys(4875): onDestroy-->10-23 02:42:32.402: INFO/chenys(4875): onCreate-->10-

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值