??????书看的是wrox《Professional Android Application Development》。因为以前初学java的时候,看的也是这个出版社的“红宝书”,所以有着有点感情。唯一有点不舒服的就是1.1,不是1.5的教程。
详细解决方案
Android学习札记(一)
热度:95 发布时间:2016-05-01 15:33:53.0
?? ? ?由于才看了前面80多页。很多都是很理论的东西。所以也这一次的笔记估计会写的比较空洞一点。
?? ????
程序类型
?? 书中有三种
???Foreground Activity,前台程序。
???Background Service,后台程序
???Intermittent Activity,间歇性程序?(这个翻译我觉得有点怪,直接翻译。如果有兴趣可以看看原书解释)
???
?? ? ?我之前看到过一篇60多页的简单介绍的小册子。我记得是的另外一种区分的方法,但是大体都是相同的。从用户的角度来说,其实就是有界面,界面出现的多少和没界面的区别而已。从程序上的区别来看,现在我知道就是foreground和background分别是activity和Service类。
?? ? ?对于此,我把这理解为程序的入口。不过和一般程序的入口只有一个不同的是,android把程序入口定义为两个,一个进去了,就会和用户的交互,也就是activity,而另一个进去了,就埋头苦干,也就是service。
Developing for Mobile Devices
?? ? ? 这是数当中的一节。写的相当的不错。是一段关于手机开发的经验谈。
Android程序的组成
??Activities,其实这个概念我现在还和上面的Foreground之类的概念有点搞混。只是隐隐约约的明白,前者是一个程序,而这里只是一个程序的一部分。
??Services。同上
??Context Providers:A shareable date Store.我理解其为一个数据库。
??Intents: A simple message-passing framework。读了几遍之后,觉得就好像是一个广播。告诉其他程序关于你的事情。
??Broadcast Receivers:与上面这个相反,表示的是一个广播接收器。
??Notifications:通知
AndroidManifest.xml
?? ? 相当于一个程序的总纲.相关的可以到网上去找,我说的绝对没有上面写的清楚。这是android程序的骨架。不可或缺。
生命周期(进程)
?? ? 这里,这不是软件的生命周期。而是程序进程。觉得android的程序的命运有点悲惨。程序不能决定自己何时被结束,一个程序的进程是否会被结束,完全依据的是虚拟机觉得是否需要结束这个进程,以释放其占有的资源。这也和我使用G1的感觉相符。
?? ? 其结束的顺序是,以保护当前运行的activity为最大。然后慢慢道后台程序……这样一个顺序。书中画了一张图,挺不错的。可以看看。
?? ? 这是有相同优先级时候的处理方式。
?? ??Where two applications have the same priority, the process that has been at a lower priority longest will be killed first.
?? ? 是否会被结束还要看依赖其的程序。被依赖程序的优先级等于,或者大于依赖其的程序。
?? ? Process priority is also affected by interprocess dependencies; if an application has a dependency on a Service or Content Provider supplied by a second application, the secondary application will have at least as high a priority as the application it supports.
相关解决方案
- android 读取byte[]中的元素解决方案
- android 标题栏兑现方式
- android 中Activity向BroadcastReceiver发送数据,该怎么解决
- Android 4.0 为什么模拟器老是提示小弟我谷歌拼音输入法已停止
- android:getSharedPreferences() 这是哪个类的方法解决思路
- android 怎么判断一个程序是否联网
- android 大量数据按周分组,该如何解决
- android RadioButton如何设置默认选中
- ksoap2-android-这个包,连接webService怎么设置超时
- android 怎么重新设置锚点
- android UI界面设计解决方案
- android 图片对象获取的有关问题
- android 怎么调用淘宝支付宝接口
- Android 沿袭InputMethodService自定义输入法
- android 关于服务连接的疑义
- android 两个activity如何通信
- android 怎么实现对view的放大和缩小
- android 教程解决方法
- android ID,该如何处理
- 准备复习2-3个月,看java+android,请问有经验者,怎么看效果最好》
- android UI线程与AsyncTask的有关问题
- android(java)中的java.net能不能和c#的system.net.sockets进行tcp通信,该如何解决
- android ListView 中的onItemClick Intent 没法跳转
- android(java) 中文乱码的有关问题
- c#c++,android,ios(iphone),php,java视屏课程 散分
- android Post文件到ASP.NET的有关问题,能收到参数收不到文件
- RIM 替 Android 开发者提供免费的 PlayBook!2月13日前
- android 动态设立控件高度
- Android test project 编译方法
- android -相机使用教程(1)解决方法