A flexible Android image loading library.一个灵活的安卓图片加载库
1.project build.gradle下添加: maven { url 'https://jitpack.io' }
如下:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
2.app build.gradle下添加依赖 :
implementation 'com.github.qzc0537:ImageLoader:1.0.1'
3.初始化实现类(默认使用Glide,其他自己实现):
ImageLoader.getInstance().setImageLoader(new GlideLoader(this,
R.mipmap.ic_launcher, R.mipmap.ic_launcher));
4.加载图片(可以是Url Uri File drawable...):
ImageLoader.getInstance()
.load(url)
.skipMemoryCache(true)
.skipDiskCache(true)
.centerCrop()
.transform(new CircleTransformation(this, 2, Color.BLACK))
.into(mIv_girl1);