Smooth transition when changing image on SimpleDraweeView
See original GitHub issueI 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!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Shared Element Transition and Fresco not working properly
The problem is, the transition is not smooth and very fast. I read here that I need to change the transition to ChangeBounds...
Read more >Using SimpleDraweeView - Fresco
When using Fresco, you will use SimpleDraweeView to display images. These can be used in XML layouts. The simplest usage example of SimpleDraweeView...
Read more >Quick tip #2 (AE): Creating an image sequence with transition
After Effects. Basic tutorial on how to make an image sequence with build in transition options in AE.... and sorry for the poor...
Read more >Create a perfect transition of one image over 2 slides in Canva
In this tutorial, I show you how to create an these smooth transition in Canva when one image in on 2 slides. #canvatutorial...
Read more >Android-WebP this is a demo showing how to display W @codeKK ...
This library is used to display animated WebP image file. It uses 3 native libraries to ... Smooth transition when changing image on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@massimocarli Thank you for your response. Say I have an image already cached and I want to request it but with bigger size to replace it. So what I do is I get the first cached bitmap, resize it, blur it and display it on SimpleDraweeView. In the meantime I request the image with bigger size, and when I receive it, I want to place it on the same SimpleDraweeView with a fade in animation. So I want the transition between the 2 images to be gapless, hence without showing a placeholder.
See #1328 and linked issues there.