Coder Social home page Coder Social logo

Comments (16)

Xwally avatar Xwally commented on April 28, 2024 2

When I set the gif in function setLowResImageRequest(),it's showing but don't playing the animation @plamenko

from fresco.

plamenko avatar plamenko commented on April 28, 2024

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.

adnan-SM avatar adnan-SM commented on April 28, 2024

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.

plamenko avatar plamenko commented on April 28, 2024

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.

plamenko avatar plamenko commented on April 28, 2024

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.

adnan-SM avatar adnan-SM commented on April 28, 2024

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.

plamenko avatar plamenko commented on April 28, 2024

http://frescolib.org/docs/supported-uris.html#_

from fresco.

blackiedm avatar blackiedm commented on April 28, 2024

@plamenko I set GIF to actual image,and RoundingParams don't work.

from fresco.

plamenko avatar plamenko commented on April 28, 2024

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.

blackiedm avatar blackiedm commented on April 28, 2024

@plamenko thanks

from fresco.

osrl avatar osrl commented on April 28, 2024

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.

plamenko avatar plamenko commented on April 28, 2024

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.

mhdatie avatar mhdatie commented on April 28, 2024

@plamenko did the push happen? It would be really useful

from fresco.

tyronen avatar tyronen commented on April 28, 2024

Progress bars have been supported since v0.2.0. See their documentation.

from fresco.

mhdatie avatar mhdatie commented on April 28, 2024

@tyronen figured that out 30 mins after my post :)

from fresco.

sydneyagcaoili avatar sydneyagcaoili commented on April 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.