B4A Library [B4X] B4XGifView - Cross platform animated gif view

1591098949811.png


I was missing a cross platform, animated gif view, so created one.

Usage is simple:
Add with the visual designer and call SetGif to set the gif file.


The B4i implementation depends on FLAnimatedImage open source project: https://github.com/Flipboard/FLAnimatedImage
The FLAnimatedImage library was uploaded to the hosted builders. If you are using a local Mac then download FLAnimatedImage-Mac and copy the files to the Libs folder.
The B4A implementation is based on this open source project: https://github.com/koral--/android-gif-drawable
The two dependent aars are attached. Copy them to B4A additional libraries folder.

Updates:

1.15 - Updated the B4A dependencies to fix a compatibility issue with targetSdkVersion 35.
1.12 - SetGif2 - Allows loading an animated gif from an array of bytes.
1.11 - GIF image ratio is preserved.
1.10 - New B4A implementation based on Android GIF Drawable. It provides better performance. Note that the Activity_Resume method has been removed. Don't miss the B4A-Dependencies zip file.
 

Attachments

  • FLAnimatedImage-Mac.zip
    140 KB · Views: 746
  • GifExample.zip
    256.4 KB · Views: 81
  • B4A-Dependencies.zip
    165.3 KB · Views: 107
  • B4XGifView.b4xlib
    1.5 KB · Views: 121
Last edited:

aeric

Expert
Licensed User
Longtime User
I added the b4xgifview lib
For B4A, you need both of the following files:
  • B4A-Dependencies.zip
  • B4XGifView.b4xlib

You need to unzip B4A-Dependencies.zip to B4A additional libraries folder.
 
Top