自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(6)
  • 收藏
  • 关注

原创 android Handler & HandlerThread

Android应用中的消息循环由Looper和Handler配合完成,Looper类用于封装消息循环,类中有个MessageQueue消息队列;Handler类封装了消息投递和消息处理等功能。在Looper.java中有一个loop()方法,有个死循环用来处理消息,代码如下:/** * Run the message queue in this thread. Be sure t

2012-08-25 10:56:57 691

翻译 Displaying Bitmaps Efficiently(3)-Caching Bitmaps

Loading a single bitmap into your user interface (UI) is straightforward, however things get more complicated if you need to load a larger set of images at once. In many cases (such as with components

2012-08-22 22:14:05 634

翻译 Displaying Bitmaps Efficiently(2)-Processing Bitmaps Off the UI Thread

The BitmapFactory.decode* methods, discussed in theLoad Large Bitmaps Efficiently lesson, should not be executed on the main UI thread if the source data is read from disk or a network location (o

2012-08-22 21:59:43 739

翻译 Displaying Bitmaps Efficiently(1)-Loading Large Bitmaps Efficiently

Images come in all shapes and sizes. In many cases they are larger than required for a typical application user interface (UI). For example, the system Gallery application displays photos taken using

2012-08-22 21:48:19 550

原创 android install location

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="string" android:sharedUserId="string" android:sharedUserLabel="string resource" a

2012-08-22 21:32:08 3371

转载 单例模式及单例对象的可序列化

为了使一个单例类变成可串行化的,仅仅在声明中添加“implements Serializable”是不够的。因为一个串行化的对象在每次返串行化的时候,都会创建一个新的对象,而不仅仅是一个对原有对象的引用。为了防止这种情况,可以在单例类中加入readResolve 方法。        下面我们先简要地回顾下对象的序列化. 一般来说, 一个类实现了 Serializable接口, 我们就可以把它

2012-08-17 15:01:45 2697

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除