Back to project page slider.
The source code is released under:
Apache License
If you think the Android project slider listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.devisnik.sliding.animation; /*from w w w . j a v a2 s .c om*/ public abstract class AnimationRunner { protected final Animation itsAnimation; public AnimationRunner(Animation animation) { itsAnimation = animation; } public void start() { onStartShifting(); schedule(new Runnable() { public void run() { itsAnimation.stepNext(); if (itsAnimation.hasNext()) schedule(this); else onDoneShifting(); } }); } protected void onDoneShifting() { // does nothing } protected void onStartShifting() { // does nothing } protected abstract void schedule(Runnable runnable); }