随笔分类 -  Android开发

 
Android开发ABC之:Context
摘要:SDK Doc中对Context的定义如下: Interface to global information about an application environment. This is an abstract class whose implementation is provided by the Android system. It allows access to applicati... 阅读全文
posted @ 2013-02-06 13:52 做个不善的人 阅读(379) 评论(0) 推荐(0)
Android开发ABC之:Service
摘要:下面是SDK doc对Service的描述: A Service is an application component representing either an application's desire to perform a longer-running operation while not interacting with the user or to supply function... 阅读全文
posted @ 2013-02-06 13:39 做个不善的人 阅读(2737) 评论(0) 推荐(0)
Android 中MVC实例之Activity,Window和View
摘要:MVC模式的简单介绍:除此之外,此模式通过对复杂度的简化,使程序结构更加直观。软件系统通过对自身基本部份分离的同时也赋予了各个基本部分应有的功能。专业人员可以通过自身的专长分组:(控制器Controller)- 负责转发请求,对请求进行处理。(视图View) - 界面设计人员进行图形界面设计。(模型Model) - 程序员编写程序应有的功能(实现算法等等)、数据库专家进行数据管理和数据库设计(可以实现具体的功能)。图中实线表示方法调用,虚线表示事件模型(Model) “数据模型”(Model)用于封装与应用程序的业务逻辑相关的数据以及对数据的处理方法。“模型”有对数据直接访问的权力,例如对数据 阅读全文
posted @ 2012-08-05 15:34 做个不善的人 阅读(11359) 评论(0) 推荐(0)
Android threading
摘要:理解基本概念 Message:消息,其中包含了消息ID,消息处理对象以及处理的数据等,由MessageQueue统一列队,终由Handler处理。Handler:处理者,负责Message的发送及处理。使用Handler时,需要实现handleMessage(Message msg)方法来对特定的Message进行处理,例如更新UI等。MessageQueue:消息队列,用来存放Handler发送过来的消息,并按照FIFO规则执行。当然,存放Message并非实际意义的保存,而是将Message以链表的方式串联起来的,等待Looper的抽取。Looper:消息泵,不断地从MessageQueu 阅读全文
posted @ 2012-07-31 20:16 做个不善的人 阅读(426) 评论(0) 推荐(0)
Performance(CPU/MEM) Monitoring with /proc in Android
摘要:/proc/stat记录了CPU使用的数据,比如CPU在用户态、nice和内核态的时间,其单位是USER_HZ or Jiffies (1/100 seconds)> adb shell cat /proc/statcpu 18485 385 17818 1731820 10138 10 244 0 0 0cpu0 16059 283 16775 847113 8982 10 243 0 0 0intr 742034 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 335460 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 阅读全文
posted @ 2012-02-26 17:41 做个不善的人 阅读(872) 评论(0) 推荐(0)