摘要: 1. 通过Handler 实现线程通信2. 在主线程中实现Handler的HandlerMessage()方法3. 在Worker Thread中通过Handler发送消息 Handler,Looper,MessageQuene三者主要完成线程之间的通讯 点击“sendMessage”按钮, 启动线... 阅读全文
posted @ 2014-07-11 22:23 Mirrorhanman 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 1. 什么是 Handler2. Handler、Looper和 MessageQueue 的基本原理3. 一个简单的例子1. 什么是 Handler2. Handlr、Looper和 MessageQueue 的基本原理 Handler 将消息放进 MessageQueue 队列中(FIFO) ... 阅读全文
posted @ 2014-07-11 21:46 Mirrorhanman 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 1. 回顾Java当中线程的概念2. MainThread 与 Worker Thread3. Android当中的线程使用1. 回顾Java当中线程的概念 两种方法:1.继承 Thread 类 , 2.实现 Runnable 接口 , 线程的生命周期:创建--->start就绪状态--->抢CP... 阅读全文
posted @ 2014-07-11 21:11 Mirrorhanman 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1. Intent 对象的基本概念2. Intent 对象的基本使用方法3. 使用 Intent 在 Activity之间传递数据的方法1. Intent 对象的基本概念 程序相当于一个个的零件,拼凑起来为一个程序2. Intent 对象的基本使用方法3. 使用 Intent 在 Activity... 阅读全文
posted @ 2014-07-11 20:19 Mirrorhanman 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 1. Activity对象的状态2. 成对的生命周期函数3. 例子1. Activity对象的状态 Pause状态 常见的就是弹出小对话框2. 成对的生命周期函数 阅读全文
posted @ 2014-07-11 19:22 Mirrorhanman 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1. 什么是生命周期2. Activity的生命周期函数3. 生命周期的调用时机1. 什么是生命周期 类似人的一生2. Activity的生命周期函数 生命周期函数不是我们来调用的,而是操作系统来管理的 我们能做的就是通过复写函数 来完成不同的功能 上帝赐予我们每个人童年 青年 中年 老年 但每二... 阅读全文
posted @ 2014-07-11 18:03 Mirrorhanman 阅读(275) 评论(0) 推荐(0) 编辑