Android鬼点子-LoadingImageView | GreendaMi'Blog

JerryXia 发表于 , 阅读 (0)

LoadingImageView

来自GreendaMi.top

     进度为0~100之间。0的时候是完全黑白。

1
2
Glide.with(this).load(url).asBitmap().into(mImg);
mImg.setProgress(p);//设置进度

     注意添加:asBitmap(),或者手动设置bitmap。只能使用ImageView默认的ScaleType。

1
2
3
4
5
6
7
8
9
10
11
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.GreendaMi:LoadingImageView:1.0'
}

     完整源码:Github

     求点心!求关注!