基本使用方法:
Glide.with(this)
.asDrawable()
.load("https://img.zhankr.net/31acdcpcjju199623.jpg")
.apply(fitCenterTransform(this))
.apply(placeholderOf(R.drawable.skyblue_logo_wechatfavorite_checked))
.into(imageView);
Glide.with()方法用于创建一个加载图片的实例。with()方法可以接收Context、Activity或者Fragment类型的参数。
load()方法,这个方法用于指定待加载的图片资源。
into()方法,让图片显示在ImageView
placeholder()方法,占位图
源码分析:
见郭霖的博客:http://blog.csdn.net/guolin_blog/article/details/53939176