最近项目快要进入开发阶段了,杂七杂八的事情比较多,另外还要兼顾一下android的培训和struts2的源码,有点忙不过来了,要多努力才行

这2天在准备android的培训文档,其实就是把《Android in action》上的要点归纳一下,之前做技术预研的时候买了几本android相关的书,感觉这本最好,虽然配套的代码差一些,所以就打算主要用这本书做培训材料了

只是把书里的要点摘要出来,作为培训内容的提纲,所以就不往论坛上帖了,免得被人投了隐藏,大家太喜欢投隐藏了,哎

1、内置应用和开发的应用,没有区别

2、Linux Kernel --> Dalvik VM --> Applications

3、Kernel: 硬件抽象层,同时提供了进程、内存、文件系统管理等核心服务

Runtime: Dalvik VM,运行时环境

Code libraries: 浏览器、数据库、绘图、影音

Managers: Activities、Views、Telephony等管理器

Hardware --> Linux Kernel --> Runtime & Libraries --> Application Managers --> Applications

4、Android基于Linux Kernel,运行在Dalvik VM里

5、四种核心组件:Activity、Service、Provider、Receiver

6、A best practice is to launch Services on a periodic or as-needed basis, triggered by a system alarm, and then have the Service terminate when its task is complete

7、在manifest.xml文件里注册的Receiver组件,不需要应用启动,就可以被触发

8、每个Android Application跑在一个单独的进程里

9、在OS资源短缺的时候,Application所在的进程,有可能会被kill,不同状态的进程的优先级有区别

10、android应用不是跑在jvm里,而是跑在Dalvik VM里,所有java字节码要转换成.dex文件格式

11、strings这些资源也是被编译成binary

12、You can define layout and views directly in code or in a layout XML resource file

13、you don’t have to use an XML file at all; instead, you can define all your layout and View configuration directly in code, as Java objects. This technique is used in applications where a dynamic GUI is required. Generally speaking, it’s often easier (and better practice) to use an XML layout resource for each Activity. An XML layout file defines View objects, organized into a hierarchical tree structure. After they’re defined in relation to the parent layout,each view can then be inflated at runtime

14、Android employs a handy adapter concept used to link views that contain collections with an underlying data source

15、An Adapter is a collection handler that returns each item in the collection as a View

16、Every process running on the Android platform is placed on a stack. When you use an Activity in the foreground, the system process that hosts that Activity is placed at the top of the stack, and the previous process (the one hosting whatever Activity was previously in the foreground) is moved down one notch

17、It decides which ones to get rid of based on a simple set of priorities:
1 The process hosting the foreground Activity is the most important.
2 Any process hosting a visible but not foreground Activity is next in line.
3 Any process hosting a background Activity is next in line.
4 Any process not hosting any Activity (or Service or BroadcastReceiver) is known as an empty process and is last in line.

18、adb shell dumpsys activity

19、If the process your Activity is in falls out of the foreground, it’s eligible to be killed and it’s not up to you; it’s up to the platform’s algorithm, based on available resources and relative priorities

20、
1 onCreate()
Called when the Activity is created. Setup is done here. Also provided is access to any previously stored state in the form of a Bundle
2 onRestart()
Called if the Activity is being restarted, if it’s still in the stack, rather than starting new
3 onStart()
Called when the Activity is becoming visible on the screen to the user
4 onResume()
Called when the Activity starts interacting with the user (This method is always called, whether starting or restarting)
5 onPause()
Called when the Activity is pausing or reclaiming CPU and other resources. This method is where you should save state information so that when an Activity is restarted, it can start from the same state it was in when it quit
6 onStop()
Called to stop the Activity and transition it to a nonvisible phase and subsequent
lifecycle events
7 onDestroy()
Called when an Activity is being completely removed from system memory. This method is called either because onFinish() is directly invoked or the system decides to stop the Activity to free up resources

21、it’s important to know that onPause() is the last opportunity you have to clean up and save state information. The processes that host your Activity classes won’t be killed by the platform until after the onPause() method has completed, but they might be killed thereafter

22、The system will attempt to run through all of the lifecycle methods every time, but if resources are spiraling out of control, as determined by the platform, a fire alarm might be sounded and the processes that are hosting activities that are beyond the onPause() method might be killed at any point

23、In addition to persistent state, you should be familiar with one more scenario: instance state. Instance state refers to the state of the UI itself. The onSaveInstanceState()method is called when an Activity might be destroyed, so that at a future time the interface state can be restored

24、耗时比较多的工作,应该在UI Thread之外完成,实现的方法是使用Handler类

25、android支持自定义View组件

26、In Android, screen layout is defined in terms of ViewGroup and
LayoutParams objects. ViewGroup is a View that contains other views (has children) and also defines and provides access to the layout

android培训文档提纲(一)相关推荐

  1. 怎么看android sdk 文档

    1.我建议大家要养成一个习惯,以后遇到疑问时,首先应该想到去sdk文档上查找,然后再去百度上google:这样做一来可以锻炼自己理解E文的能力,二来也会让自己的印象更深刻些 1号区域:标签栏,各个标签 ...

  2. 20165234 [第二届构建之法论坛] 预培训文档(Java版) 学习总结

    [第二届构建之法论坛] 预培训文档(Java版) 学习总结 我通读并学习了此文档,并且动手实践了一遍.以下是我学习过程的记录~ Part1.配置环境 配置JDK 原文中提到了2个容易被混淆的概念 JD ...

  3. [第二届构建之法论坛] 预培训文档(C++版)

    本博客是第二届构建之法论坛暨软件工程培训活动预培训文档中[适用于结对编程部分的C++版本],需要实验者有一部分C++基础. 目录 Part0.背景 Part1.配置环境 Part2.克隆项目 Part ...

  4. android sdk 文档导读之前传:初涉

    看到csdn博客上面其它大牛的系列性android博客,小弟确实十分羡慕.所以经过一番思想斗争后,小弟终于要打算写写系列性的博客了.通过对一些选题的推敲,我决定对android的sdk文档进行一个比较 ...

  5. 计算机装配调试员培训内容.doc,电子计算机装配调试员理论培训文档.doc

    电子计算机装配调试员理论培训文档 一.综合题 计算机的系统资源划分为哪几类?包括哪些具体内容? 答:计算机系统资源分为硬件资源和软件资源两大类, 硬件资源包括运算器.控制器.存储器和输入设备.输出设备 ...

  6. 花998购买的拍摄技巧和7天起号培训文档,学了一周的总结。

    花998购买的拍摄技巧和7天起号培训文档,学了一周的总结. 为了更加专业的给大家讲讲短视频和自媒体,花了998买了一套培训教材,然后花了一周的时间细细的学习了一下. 学完后,对于拍摄和运营都有了进步, ...

  7. IDS(Informix Dynamic Server)的培训文档[转贴]

    IDS的培训文档!对IDS系统体系结果讲的简洁明了,挺好! -------------------------------------------------------------- 第一章 Inf ...

  8. Android入门文档

    该文章为网络材料整理,部分内容经过重新编写. 一. 名词介绍 JDK:Java Development Kit Java 语言的软件开发工具包 JRE:Java Runtime Environment ...

  9. Minitab软件下载与培训文档

    最近使用六西格玛对毛刺长度进行正太分布分析计算.发现minitab这个软件挺好用,我就写个文章记录一下方便自己以后查找. 1. 下载 软件:http://download.csdn.net/detai ...

最新文章

  1. 工作流引擎--swamp
  2. ES5原生api(2)
  3. python绘制立体扇形_Python实现PS滤镜特效之扇形变换效果示例
  4. Linux编译soci库,Soci库linux下的编译方法
  5. 1.阿里云RDS配置白名单,实例,外网地址,mysql数据库。
  6. CentOS修改网络配置
  7. 微信公众号自定义菜单设置管理
  8. 抓取网络源码python_使用Python进行网络抓取的新手指南
  9. 软件工程关于自动生成四则运算题目程序的见解
  10. ios UIlabel
  11. java的实例变量_JAVA语言中的实例变量
  12. 三种射频通信接收机原理框图及优缺点
  13. chrome 安装 gliffy 绘图插件以及使用
  14. 超市不同时段人流量统计分析
  15. 【定制Android系统】Android O 修改吉字节为GB
  16. 《刘擎西方现代思想讲义》读书笔记
  17. 基于SEIR模型对美国COVID-19疫情传播的预测和分析
  18. ARFoundation系列讲解 - 31 光照估计
  19. ∵∵∵∵不开心∵∵∵∵
  20. 关于芯片之争,你需要知道这些本质

热门文章

  1. 浅谈数字人民币什么时候正式推出DCEP钱包在哪里下载
  2. Java 列表用指定字符拼接成字符串 StringJoiner
  3. selenium窗口切换和关闭指定窗口
  4. 初次maven实现学生信息系统
  5. [附源码]JSP+ssm计算机毕业设计大学生工作室管理系统5465a【源码、数据库、LW、部署】
  6. 时间轮-Java实现篇
  7. 考勤助手——第九周工作总结
  8. 2021年中国电子展将举行,TCL蓄势待发,邀您见证科技风暴
  9. arduino调试的流程图_Arduino UNO 样板调试
  10. phpbb风格模板_phpbb3 风格定制 | 学步园