GifImageView


Source link: https://github.com/felipecsl/GifImageView

GifImageView

Android ImageView that handles Animated GIF images

Usage

In your build.gradle file:

dependencies {

  compile 'com.felipecsl:gifimageview:2.1.0' 
}

In your Activity class:

@Override protected void onCreate(final Bundle savedInstanceState) {

  super.onCreate(savedInstanceState);

gifView = (GifImageView) findViewById(R.id.gifImageView);

  gifView.setBytes(bitmapData);
 
}
  @Override protected void onStart() {

  super.onStart();

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

  super.onStop();

  gifView.stopAnimation();
 
}

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

gifImageView.setOnFrameAvailable(new GifImageView.OnFrameAvailable() {

  @Override
  public Bitmap onFrameAvailable(Bitmap bitmap) {

return blurFilter.blur(bitmap);

  
}
 
}
);

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

Demo

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

Snapshots of the development version are available in Sonatype's snapshots 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-2015 Felipe Lima. Code released under the MIT license.

Resources

Simple RxJava library for observing and requesting Android runtime permissions introduced in Android 6.0.

Fun to use Floating Action Button (FAB) view for Android 4.0 and higher.

SciChart for Android is a new native Android Charting Library which supports Java and the Android SDK for development of applications and embedded systems that require high performance, real-time Android Charts. With groundbreaking performance and an intuitive, extensible API, SciChart’s Android Chart Library makes impossible projects, possible.

TinyMachine is fun to use finite-state machine. It helps you to write compact and clearly structured code when used in event-driver programming. No deep if-else or switch-case statements, no static state transition tables, no complex, hard to understand models. Just clearly structured state handling and transition logic. This is what TinyMachine is.

This library provides a simple service that allows to display arbitrary text as a system-window overlay.

This library allows to format bank card number automatically, adding a space after every four symbols.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes