Comments (16)
When I set the gif in function setLowResImageRequest(),it's showing but don't playing the animation @plamenko
from fresco.
I have changes ready to add a real progress information to Fresco, so expect this very soon.
The way the progressBar works at the moment is: display progress bar image until the final image is ready. This is just a drawable and at the moment we provide the AutoRotateDrawable which can be used for displaying an indefinite spinner until the image is ready. You can specify progressBarImage
and progressBarAutoRotateInterval
in XML. You can also use your own drawable if you wish.
What I am adding now is real progress, so that as the bytes are downloading, we set the level to the progressbar drawable (0 to 10000). That means that drawable is now aware of the real progress and based on its level can display that progress in whichever way it wants. We'll provide a ProgressBarDrawable that just draws a line based on the percentage, but you can implement your custom drawable to do whatever you want.
from fresco.
Any way we could play GIF as the placeholder ? May be not a loader but some other GIF itself. The only way I can think of right now is having two Drawee Views on top of each other one playing a local GIF till the network fetch happens and then hide it and show the loaded image from the network.
from fresco.
This is possible, but in order to be able to answer on how to do it, I need the information on where do you get the GIF image from?
from fresco.
Also, you can try using low-res image as explained in the documentation: http://frescolib.org/docs/requesting-multiple-images.html#_
DraweeController controller = Fresco.newDraweeControllerBuilder()
.setLowResImageRequest(ImageRequest.fromUri(gifPlaceholderUri))
.setImageRequest(ImageRequest.fromUri(uri))
.setOldController(mSimpleDraweeView.getController())
.build();
mSimpleDraweeView.setController(controller);
from fresco.
The low resolution thing works fine, but what if I wanted to play a GIF bundled locally within the app in assets ? How would I do something like that, apart from having 2 overlapping drawee objects ?
from fresco.
http://frescolib.org/docs/supported-uris.html#_
from fresco.
@plamenko I set GIF to actual image,and RoundingParams don't work.
from fresco.
Default rounding mode, BITMAP_ONLY, doesn't support animations. Please check if OVERLAY_COLOR
rounding mode would work for you. For best appearance, you should use the same color that is beneath the DraweeView for overlay color (e.g. the ListView background color if DraweeView sits in the ListView).
See http://frescolib.org/docs/rounded-corners-and-circles.html#_
from fresco.
@plamenko thanks
from fresco.
Hello @plamenko . You say there is no way to use a custom prorgressBar
right now am I right? Is there a plan on that? I want to show an indefinite progressBar instead of a real progress. I think the only way to show good looking progressBar is hide/show drawee and progressBar. Could progressBarImage
be an AnimationDrawable
? That wouldn't be as smooth as a custom view though.
from fresco.
Hi. Nope, I said that you can use whatever drawable you wish, but at the time we didn't support real progress. Now we do support real progress too, we just need to do a github push.
progressBarImage
can be an AnimationDrawable
, it's just that we don't call start/stop on it. I should probably add that logic.
from fresco.
@plamenko did the push happen? It would be really useful
from fresco.
Progress bars have been supported since v0.2.0. See their documentation.
from fresco.
@tyronen figured that out 30 mins after my post :)
from fresco.
Well, I have an animated drawable.. and it needs code to start it somewhere, can this be handled now on the current version?
from fresco.
Related Issues (20)
- How to use AbstractAdaptiveCountingMemoryCache
- Compile error with new Mac Apple Chip
- OutOfMemoryError: Failed to allocate a 251648770 byte allocation [Local large images allocation issue] HOT 2
- While updating app from playstore the images not displaying properly HOT 2
- In the document, the Korean link has been cracked to some Ad link. HOT 2
- fetchWithRequest Override
- there has a memory leak, AndroidProfile tools tips me that "mCallerContext in com.facebook.imagepipeline.cache.BitmapMemoryCacheKey"。 HOT 3
- Fresco Unsatisfied Link Error
- IllegalStateException
- when update 3.1.0 Building error:Failed to transform vito-options-3.1.0.aar HOT 2
- Libwebp v1.0.0 存在CVE-2023-4863漏洞 HOT 7
- 3.1.1 Exception loading animated gif HOT 2
- GIFs do not load on v3.1.3 HOT 3
- Bug: Crash on MIUI 14.0.5 HOT 1
- React Native app crashes on startup with fresco version 3.1.3 HOT 11
- java.lang.ClassNotFoundException: Didn't find class "com.facebook.imagepipeline.nativecode.NativeJpegTranscoderFactory"
- Fresco is dying. HOT 1
- too many gifs in recyclerview
- How to get free hard cap?
- error initializing Fresco HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fresco.