Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Android ImageView that handles animated GIF images

License

NotificationsYou must be signed in to change notification settings

felipecsl/GifImageView

Repository files navigation

Android ImageView that handles Animated GIF images

Android ArsenalBuild Status

Usage

In yourbuild.gradle file:

dependencies {    implementation'com.felipecsl:gifimageview:2.2.0'}

In yourActivity class:

@OverrideprotectedvoidonCreate(finalBundlesavedInstanceState) {super.onCreate(savedInstanceState);gifView =findViewById(R.id.gifImageView);gifView.setBytes(bitmapData);}@OverrideprotectedvoidonStart() {super.onStart();gifView.startAnimation();}@OverrideprotectedvoidonStop() {super.onStop();gifView.stopAnimation();}

If you need to post-process the GIF frames, you can do that viaGifImageView.setOnFrameAvailable().You can see an example of that in the sample app included on the repository.

gifImageView.setOnFrameAvailable(newGifImageView.OnFrameAvailable() {@OverridepublicBitmaponFrameAvailable(Bitmapbitmap) {returnblurFilter.blur(bitmap);  }});

You can also reset an animation to play again from the beginninggifImageView.resetAnimation(); or show a specific frame of the animationgifImageView.gotoFrame(3);

Demo

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

Snapshots of the development version are available inSonatype'ssnapshots repository.

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- Felipe Lima.Code released under theMIT license.

About

Android ImageView that handles animated GIF images

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors12


[8]ページ先頭

©2009-2025 Movatter.jp