Awesome
PhotoDraweeView
PhotoView For Fresco
![Maven Central](https://maven-badges.herokuapp.com/maven-central/me.relex/photodraweeview/badge.svg)
![PhotoDraweeView](/screenshot.gif)
Gradle
AndroidX
dependencies {
implementation 'com.facebook.fresco:fresco:x.x.x' // (latest)
implementation 'me.relex:photodraweeview:2.1.0'
}
Android Support Library
dependencies {
implementation 'com.facebook.fresco:fresco:x.x.x' // (latest)
implementation 'me.relex:photodraweeview:1.1.3'
}
Usage
mPhotoDraweeView.setPhotoUri(Uri.parse("http://your.image.url"));
Using the ControllerBuilder
PipelineDraweeControllerBuilder controller = Fresco.newDraweeControllerBuilder();
controller.setUri(URI);
controller.setOldController(mPhotoDraweeView.getController());
controller.setControllerListener(new BaseControllerListener<ImageInfo>() {
@Override
public void onFinalImageSet(String id, ImageInfo imageInfo, Animatable animatable) {
super.onFinalImageSet(id, imageInfo, animatable);
if (imageInfo == null || mPhotoDraweeView == null) {
return;
}
mPhotoDraweeView.update(imageInfo.getWidth(), imageInfo.getHeight());
}
});
mPhotoDraweeView.setController(controller.build());