src/main/java/ru/mail/dondokidon/extensions/Drawable/ExtendedAnimationDrawable.java
/**
     * Start animation.
     *
     * If {@link #isStarted()} is <t>true</t> then if {@link #isOneShot()} is <t>false</t> and
     * {@link #isRuntimeReverse()} is <t>true</t> then current animation
     * will be reversed, else {@link #cancel()} will be called and animation will be started
     * from begin.
     */
Start animation.
If  #isStarted() is true then if  #isOneShot() is false and
#isRuntimeReverse() is true then current animation
will be reversed, else  #cancel() will be called and animation will be started
from begin.
Start animation . If #isStarted () is true then if #isOneShot () is false and #isRuntimeReverse () is true then current animation will be reversed else #cancel () will be called and animation will be started from begin .
@Override
    public void start() {
        if (isVisible() && !(isOneShot() && isPlayed)) {
            if (animator.isStarted()){
                if (isRuntimeReverse && !isOneShot()){
                    CurrentAnimationDirection = CurrentAnimationDirection.equals(AnimationDirection.FORWARD) ?
                            AnimationDirection.BACKWARD : AnimationDirection.FORWARD;
                    animator.reverse();
                } else {
                    cancel();
                    animator.start();
                }
            } else {
                switch (CurrentAnimationDirection) {
                    case FORWARD:
                        animator.setIntValues(0, getNumberOfFrames() - 1);
                        break;
                    case BACKWARD:
                        animator.setIntValues(getNumberOfFrames() - 1, 0);
                        break;
                }
                animator.start();
            }
        }
    }
@ Override public void start ( ) { if ( isVisible ( ) && ! ( isOneShot ( ) && isPlayed ) ) { if ( animator . isStarted ( ) ) { if ( isRuntimeReverse && ! isOneShot ( ) ) { CurrentAnimationDirection = CurrentAnimationDirection . equals ( AnimationDirection . FORWARD ) ? AnimationDirection . BACKWARD : AnimationDirection . FORWARD ; animator . reverse ( ) ; } else { cancel ( ) ; animator . start ( ) ; } } else { switch ( CurrentAnimationDirection ) { case FORWARD : animator . setIntValues ( 0 , getNumberOfFrames ( ) - 1 ) ; break ; case BACKWARD : animator . setIntValues ( getNumberOfFrames ( ) - 1 , 0 ) ; break ; } animator . start ( ) ; } } }
Start animation.
Start animation .