PhotoView For Fresco
Switch branches/tags
Clone or download
Relex
Latest commit 5aa08f9 Oct 9, 2018

README.md

PhotoDraweeView

PhotoView For Fresco

Download

PhotoDraweeView

Gradle

AndroidX
dependencies {
    implementation 'com.facebook.fresco:fresco:x.x.x' // (latest)
    implementation 'me.relex:photodraweeview:2.0.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());

Issues With ViewGroups