随笔分类 -  android消息

摘要:一个帖子的整理:Handler一定要在主线程实例化吗?new Handler()和new Handler(Looper.getMainLooper())的区别如果你不带参数的实例化:Handler handler = new Handler();那么这个会默认用当前线程的looper一般而言,如果你... 阅读全文
posted @ 2015-11-25 17:26 maxiongying 阅读(2400) 评论(0) 推荐(0) 编辑
摘要:One of the reasons I love Android API is because it contains so many useful little things. Many of them are not even specific to the platform and I re... 阅读全文
posted @ 2015-11-25 17:06 maxiongying 阅读(164) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/codingmyworld/archive/2011/09/14/2174255.html 阅读全文
posted @ 2015-11-25 16:19 maxiongying 阅读(173) 评论(0) 推荐(0) 编辑
摘要:Android中的Looper类,是用来封装消息循环和消息队列的一个类,用于在android线程中进行消息处理。handler其实可以看做是一个工具类,用来向消息队列中插入消息的。 (1) Looper类用来为一个线程开启一个消息循环。 默认情况下android中新诞生的线程是没有开启消息循环的... 阅读全文
posted @ 2015-10-20 15:28 maxiongying 阅读(681) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示