Comments (8)
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.
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.
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.
Yes, it is in the device.
from gifimageview.
http://stackoverflow.com/questions/6058003/elegant-way-to-read-file-into-byte-array-in-java
from gifimageview.
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.
yeah i'd recommend stopping the animation when you leave the activity
from gifimageview.
That's exactly what I did. Thanks.
from gifimageview.
Related Issues (20)
- First frame is overlapped over last frame on tranparent animated GIF HOT 4
- ANR exception in Google Play console. HOT 1
- Transparent GIF shows black. HOT 1
- Gif play speed varies from device to device HOT 2
- Does this support Android 4.4.2? HOT 3
- How to Load Gif image from File System HOT 1
- Frame might still get updated after stopAnimation is called
- No resetAnimation() HOT 3
- play animation for only once and stop HOT 1
- How could i get all frames of a .gif and store as jpeg in a folder using your "GifDecoder".
- Add the function from GifDecoder to get total frame count to the library
- cann't stop HOT 2
- NullPointerException HOT 2
- NullPointerException HOT 2
- Crashes in recycler view
- CreateProcess error=2, The system cannot find the file specified HOT 1
- How to display gif image from external storage ? HOT 2
- Stop at specific frame HOT 1
- getting Build failed after migrated to AndroidX HOT 4
- Memory leak due to rapid toggle of animation
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 gifimageview.