Skip to content

KAnimationController will make your view animation simple.

License

Notifications You must be signed in to change notification settings

kongsin/ViewAnimationController

Repository files navigation

ViewAnimatorController

Note : RelativeLayout is friendly with KAnimationController ^+++^

Preview

Sample Image Sample Image


  • BaseAnimationControl is an animation object
     BaseAnimationObject imageAnimObj = new BaseAnimationObject(img);
  • AnimationQueue for manage queue of the animation object
  • AnimationQueue.nextQueue for add animation queue
  • AnimationQueue.startByQueue for start as a queue
  • AnimationQueue.startTogether for play all animation together
                AnimationQueue animationQueue = new AnimationQueue();
                animationQueue.nextQueue(0, b1);                
                animationQueue.nextQueue(0, b2);
                animationQueue.nextQueue(0, b3);
                animationQueue.startByQueue();
                //or
                //animationQueue.startTogether();

Example

                BaseAnimationObject b1 = new BaseAnimationObject(img).moveToCenterVertical(main).moveToCenterHorizontal(main);
                
                BaseAnimationObject b2 = new BaseAnimationObject(img2);
                b2.stackToLeftOf(b1).marginRight(50);
                
                BaseAnimationObject b3 = new BaseAnimationObject(img3);
                b3.stackToRightOf(b1).marginLeft(50);
                
                AnimationQueue animationQueue = new AnimationQueue();
                animationQueue.nextQueue(0, b1);                
                animationQueue.nextQueue(0, b2);
                animationQueue.nextQueue(0, b3);
                animationQueue.setCallback(new AnimationQueue.AnimatedCallback() {
                    @Override
                    public void finished() {

                    }

                    @Override
                    public void eachQueueFinished(BaseAnimationObject control) {
                        Log.i(TAG, "eachQueueFinished: " + control.getView().getId());
                    }
                });
                
                animationQueue.startByQueue();

About

KAnimationController will make your view animation simple.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages