- 博客(6)
- 资源 (4)
- 收藏
- 关注
转载 java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
(1) Looper类用来为一个线程开启一个消息循环。默认情况下Android中新诞生的线程是没有开启消息循环的。(主线程除外,主线程系统会自动为其创建Looper对象,开启消息循环)Looper对象通过MessageQueue来存放消息和事件。一个线程只能有一个Looper,对应一个MessageQueue。 (2) 通常是通过Handler对象来与Looper交
2015-07-24 18:08:31 4478
转载 java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
(1) Looper类用来为一个线程开启一个消息循环。 默认情况下Android中新诞生的线程是没有开启消息循环的。(主线程除外,主线程系统会自动为其创建Looper对象,开启消息循环)Looper对象通过MessageQueue来存放消息和事件。一个线程只能有一个Looper,对应一个MessageQueue。(2) 通常是通过Handler对象来与Looper交互的。Handler可看做是Lo
2015-07-24 17:26:26 505
转载 MVP for Android: how to organize the presentation layer
MVP (Model View Presenter) pattern is a derivative from the well known MVC (Model View Controller), which for a while now is gaining importance in the development of Android applications. There are
2015-07-19 14:54:47 737
转载 Android高效加载大图、多图解决方案_LruCache,有效避免程序OOM
本篇文章主要内容来自于Android Doc,我翻译之后又做了些加工,英文好的朋友也可以直接去读原文。http://developer.android.com/training/displaying-bitmaps/index.html高效加载大图片我们在编写Android程序的时候经常要用到许多图片,不同图片总是会有不同的形状、不同的大小,但在大多数情况下,这些图片都会大
2015-07-15 20:40:54 348
转载 Android中Application类用法
Application类Application和Activity,Service一样是Android框架的一个系统组件,当Android程序启动时系统会创建一个Application对象,用来存储系统的一些信息。Android系统自动会为每个程序运行时创建一个Application类的对象且只创建一个,所以Application可以说是单例(singleton)模式的一个类。通常我们是
2015-07-06 09:56:30 378
转载 看Volley源码,对HTTP缓存机制分析
Volley是android官方实现的HTTP请求库,实现非常优美,这里暂不分析。可是在网络请求时它有一个对response code == 304 的判断,这个让我很纳闷,度娘加谷哥很久发现,原来这是HTTP协议支持的缓存策略,主要服务器的协作才能达到缓存的目的,下面分析下 如何达成:首先要明白的是更新操作主要是为了保证缓存中的内容与远端server中的内容保持一致,HTTP协议规范中规
2015-07-03 09:37:16 518
Android图表--achartengine
2014-10-26
SmartUpload上传及下载
2014-09-12
JFreeChart使用相关
2014-09-11
DAO设计模式Demo
2014-09-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人