B4A Library AnimatedGifView DesignerCustomView Control

Introduction

This is a DesignerCustomView control which is based on the native android movie view and will allow you to display animated gifs (tranparent ones as well).

How to use

1. Extract the AnimatedGifView jar + xml to the B4A libraries folder.
2. Open the IDE and check the AnimatedGifView library in the list of libraries.
3. Open the designer, drop a CustomView control, and in the CustomType choose AnimatedGifView.

You can load files by using the Load method:
B4X:
'Set the 3rd parameter to true to automatically start it
AnimatedGif.Load(File.DirAssets, "1.gif", False)

Properties: Visible, Stopped, Paused, Frame, Frames, EventsDisabled
Methods: Load
Events: Load, Pause, Stop, Frame, Play

Note: If you are just using it for ajax loaders, then set the Tag property to 1 in order to disable events and save some some serious CPU cycles.

In the samples folder, there is a ready-to-play sample project.

Enjoy! :D

Version history:

1.2
  • Added: Visible, Frame, Frames, EventsDisabled properties
  • Removed: Resume event
  • Added: Load, Pause, Stop, Frame, Play events
1.1
  • Removed: Pause, Resume methods
  • Added: Paused, Stopped property. Stopped = true will reset the animation frame.
1.0
  • Initial version
 

Attachments

  • upload_2014-7-11_18-59-51.png
    upload_2014-7-11_18-59-51.png
    45.3 KB · Views: 512
  • sample1.png
    sample1.png
    19.8 KB · Views: 476
  • AnimatedGifView.zip
    404 KB · Views: 710
Last edited:

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Update: 1.2
  • Added: Visible, Frame, Frames, EventsDisabled properties
  • Removed: Resume event
  • Added: Load, Pause, Stop, Frame, Play events
 
Last edited:

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Last edited:

Ddancer

Member
Licensed User
Longtime User
This is Fantastic! - Great Work - tried other methods with problems and errors - this was
s m o o t h.

Thanks!
 
Top