-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding an animated drawable as a placeholder? #29
Comments
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 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. |
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. |
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? |
Also, you can try using low-res image as explained in the documentation: http://frescolib.org/docs/requesting-multiple-images.html#_
|
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 ? |
@plamenko I set GIF to actual image,and RoundingParams don't work. |
Default rounding mode, BITMAP_ONLY, doesn't support animations. Please check if |
@plamenko thanks |
Hello @plamenko . You say there is no way to use a custom |
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.
|
@plamenko did the push happen? It would be really useful |
Progress bars have been supported since v0.2.0. See their documentation. |
@tyronen figured that out 30 mins after my post :) |
Well, I have an animated drawable.. and it needs code to start it somewhere, can this be handled now on the current version? |
When I set the gif in function setLowResImageRequest(),it's showing but don't playing the animation @plamenko |
Is there a way to add a
prorgressBar
or a different view (maybe a custom view like materialish-progress) as a placeholder? No image library is capable of this. Is theprogressBarImage
animatable?The text was updated successfully, but these errors were encountered: