Android 图片加载和缓存库 Glide
- 授权协议: BSD
- 开发语言: Java
- 操作系统: Android
- 软件首页: https://github.com/bumptech/glide
- 软件文档: https://github.com/bumptech/glide
软件介绍
Glide 是一个 Android 上的图片加载和缓存库,其目的是实现平滑的图片列表滚动效果。
示例代码:
// For a simple view:
@Override
public void onCreate(Bundle savedInstanceState) {
...
ImageView imageView = (ImageView) findViewById(R.id.my_image_view);
Glide.with(this).load("http://goo.gl/h8qOq7").into(imageView);
}
// For a list:
@Override
public View getView(int position, View recycled, ViewGroup container) {
final ImageView myImageView;
if (recycled == null) {
myImageView = (ImageView) inflater.inflate(R.layout.my_image_view,
container, false);
} else {
myImageView = (ImageView) recycled;
}
String url = myUrls.get(position);
Glide.with(myFragment)
.load(url)
.centerCrop()
.placeholder(R.drawable.loading_spinner)
.crossFade()
.into(myImageView);
return myImageView;
}
Reality Is Broken
Jane McGonigal / Penguin Press HC, The / 2011-1-20 / USD 26.95
Visionary game designer Jane McGonigal reveals how we can harness the power of games to solve real-world problems and boost global happiness. More than 174 million Americans are gamers, and......一起来看看 《Reality Is Broken》 这本书的介绍吧!
