SmartImageView
is a drop-in replacement for Android’s standardImageView
which additionally allows images to be loaded from URLs or the user’s contact address book. Images are cached to memory and to disk for super fast loading.
1.概述
SmartImageView 是一个Android替代标准ImageView,可以将图像从url(网络地址)或用户的联系人图片中进行加载。通过将图像缓存在内存和磁盘中来使图片加载更快。
ImageView
SmartImage
class is easily extendable to load from other sources2.特性:
作为ImageView的替代
可以从一个URL装载图像
可以从手机的联系人通讯录加载图片
异步加载图片,加载在UI线程
图像缓存在内存和磁盘以使其加载更快
SmartImage类很容易从其他来源可扩展加载
3.基本使用方法:
①加一个SmartImageView到你Activity的xml布局中:
<com.loopj.android.image.SmartImageView
android:id="@+id/my_image" />
②
得到一个参考布局的SmartImageView:
SmartImageView myImage = (SmartImageView) this.findViewById(R.id.my_image);
myImage.setImageUrl("http://www.awesomeimages.com/myawesomeimage.jpg");
④从
手机的联系人通讯录中加载图片
myImage.setImageContact(contactAddressBookId);
James Smith, British entrepreneur and developer based in San Francisco.
I'm the co-founder of Bugsnag with Simon Maynard, and from 2009 to 2012 I led up the product team as CTO of Heyzap.
詹姆斯•史密斯英国企业家和开发人员位于旧金山。5.Jar包下载