/PhotoDraweeView

PhotoView For Fresco

Primary LanguageJavaApache License 2.0Apache-2.0

This project is no longer maintained. Recommend using LargeDraweeView

PhotoDraweeView

PhotoView For Fresco

Maven Central Version

PhotoDraweeView

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());