Giter Club home page Giter Club logo

pandamation's Introduction

pandamation

About Pandamation

Pandamation is an open source android framework for frame animation. The built in android framework has a few issues that this library solves. The first of these issues are the memory issues with android's. When a frame animation is done with androids framework it loads all of the frames in to memory up front. This causes out of memory exceptions if you use large frames or a large number of frames. Additionally android's framework does not provide a method to provide a frame number to stop on. This functionality allows you to use a frame animation for progress or other of those types of tasks and allows you to use it for intermediary values. The goal was to use the same animation list xml that the android version uses.

Setup

Build.Gradle

  • Add Maven
maven {
           url "https://oss.sonatype.org/content/repositories/snapshots"
       }
  • Add the project
compile 'com.github.jaredcorso:Pandamation:1.2-SNAPSHOT'

additionally the project requires apache's IO Utils so you will also need to add

compile 'org.apache.directory.studio:org.apache.commons.io:2.4'

#Using the Framework

There are two main usages that can be used statically as shown below:

Pandamate.animate(int resourceId, final ImageView imageView, final Runnable onStart, final Runnable onComplete)
Pandamate.animateWithStopFrame(int resourceId, final ImageView imageView, final Runnable onStart, final Runnable onComplete, int frameToEndOn)
  • resourceId : the id to the xml with the animation list (identical to the format the android version requires)
  • imageView : the imageview you want the animation to be loaded into
  • onStart : a runable you want run before the animation
  • onComplete : a runable you want run after the animation is complete
  • frameToStopOn : (2nd method only) the frame number you want the animation to stop on

#Footnote special props to Ryan Baumbach for coming up with the name for this library
extra special props to Justin Berot-Burns for the Pandamation logo

pandamation's People

Contributors

jaredcorso avatar berotburns avatar

Stargazers

liaoyicong avatar Paakjis avatar Igor Matos avatar Joel Dean avatar ZekeZhang avatar Khalid O. Lamptey avatar Pranav Lathigara avatar  avatar Luck Hard avatar  avatar cfirmo33 avatar MartinRGB avatar 裸奔的企鹅 avatar klwb avatar Arlind avatar  avatar Charon avatar Julien PIERRE-LOUIS avatar  avatar  avatar  avatar Meredith Godar avatar  avatar  avatar Mox avatar  avatar Jonathan Klecker avatar Ryan Baumbach avatar  avatar Saad Farooq avatar

Watchers

 avatar

pandamation's Issues

animation oneshot

i tested this library ... nice work
i change the animation "oneshot" to "false" in the xml file but it wont play continuously!!!
Did I do something wrong or the library cant play animation continuously?!
note that... i can calculate the play time and use handler to make animation continuously...
but the result is not same in new and old phone...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.