Skip to content

renjixiang/GifImageView

 
 

Repository files navigation

GifImageView

Android ImageView that handles Animated GIF images

Android Arsenal

Usage

In your build.gradle file:

dependencies {
    compile 'com.felipecsl:gifimageview:1.0.6'
}

In your Activity class:

@Override
protected void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    gifView = new GifImageView(context);
    gifView.setBytes(bitmapData);
    setContentView(gifView);
}

@Override
protected void onStart() {
    super.onStart();
    gifView.startAnimation();
}

@Override
protected void onStop() {
    super.onStop();
    gifView.stopAnimation();
}

Demo

Be sure to also check the demo project for a sample of usage!

Caveats

  • Doesn't yet handle GIFs with transparency. Transparent channel will probably appear as black. See Issue #11

Contributing

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

Copyright and license

Code and documentation copyright 2011-2014 Felipe Lima. Code released under the MIT license.

About

Android ImageView that handles animated GIF images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%