• Stars
    star
    1,233
  • Rank 38,074 (Top 0.8 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PhotoView For Fresco

PhotoDraweeView

PhotoView For Fresco

Maven Central

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

Issues With ViewGroups