I have a SimpleDraweeView that is processing an image request through a controller:
Postprocessor redMeshPostprocessor = new BasePostprocessor() {
@Override
public String getName() {
return "redMeshPostprocessor";
}
@Override
public CloseableReference<Bitmap> process(
Bitmap sourceBitmap,
PlatformBitmapFactory bitmapFactory) {
//custom processing on the bitmap and returning it
}
};
ImageRequest request = ImageRequestBuilder.newBuilderWithSource(Uri.parse(coverImage))
.setPostprocessor(redMeshPostprocessor)
.build();
PipelineDraweeController controller = (PipelineDraweeController)
Fresco.newDraweeControllerBuilder()
.setImageRequest(request)
.setOldController(iv_cover.getController())
// other setters as you need
.build();
iv_cover.setController(controller);
Then later on, I want to change the image on the SimpleDraweeView by simply saying:
iv_cover.setImageURI(Uri.parse(url));
Problem is that when loading the second image, there's a split second where the SimpleDraweeView is showing the placeholder. How to avoid that? Want the transition between the 2 images to be gapless and smooth. Thanks!