Use RxJava to download and cache imgages
- Add jitpack in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- Add the dependency in your app build.gradle
dependencies {
compile 'com.github.Chaoba:RxImageloader:v1.0'
}
- Init RxImageLoader
RxImageLoader.init(getApplicationContext());
- Load image with RxImageLoader
RxImageLoader.loadImage(ImageView, url).subscribe();