Giter VIP home page Giter VIP logo

Comments (8)

felipecsl avatar felipecsl commented on May 28, 2024

This doesnt make much sense. A GIF is composed of several Bitmaps. You can't have a GIF that's a Bitmap, unless the GIF only has a single frame.

from gifimageview.

aritraroy avatar aritraroy commented on May 28, 2024

Then how do I attach GIFs in this View. I mean if I have an image in the internal memory, how do I attach it to the View? Any help is really appreciated.

from gifimageview.

felipecsl avatar felipecsl commented on May 28, 2024

Ultimately all you need is a byte array. If you have a File for example, you need to read that file into a byte[] and then set into the GifImageView. The sample project in the repository has an example for downloading the GIF from the network and displaying. Where is your file coming from? Is it already in the device?

from gifimageview.

aritraroy avatar aritraroy commented on May 28, 2024

Yes, it is in the device.

from gifimageview.

felipecsl avatar felipecsl commented on May 28, 2024

http://stackoverflow.com/questions/6058003/elegant-way-to-read-file-into-byte-array-in-java

from gifimageview.

aritraroy avatar aritraroy commented on May 28, 2024

Works perfectly for me now. Thanks for your help.

And btw, if there some best practice to make minimum memory usage? I mean should I be stopping the animations on onStop()? Or something else?

from gifimageview.

felipecsl avatar felipecsl commented on May 28, 2024

yeah i'd recommend stopping the animation when you leave the activity

from gifimageview.

aritraroy avatar aritraroy commented on May 28, 2024

That's exactly what I did. Thanks.

from gifimageview.

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.