src/main/java/ru/mail/dondokidon/extensions/Drawable/ExtendedAnimationDrawable.java
/**
     * Set current frame. If there is no frame with passed index set it to {@link #NO_FRAME}
     *
     * @param index Index of frame
     * @return True if successfully set
     * @see AnimationDrawable#selectDrawable(int)
     */
Set current frame. If there is no frame with passed index set it to  #NO_FRAME
@param index Index of frame
@return True if successfully set
@see AnimationDrawable#selectDrawable(int)
Set current frame . If there is no frame with passed index set it to #NO_FRAME @param index Index of frame @return True if successfully set @see AnimationDrawable#selectDrawable ( int )
@Override
    public boolean selectDrawable(int index) {
        boolean ret = super.selectDrawable(index);
        int OldFrameIndex = CurrentFrameIndex;
        if (ret)
            CurrentFrameIndex = index;
        else
            CurrentFrameIndex = NO_FRAME;
        triggerOnFrameChangedListeners(OldFrameIndex, CurrentFrameIndex);
        return ret;
    }
@ Override public boolean selectDrawable ( int index ) { boolean ret = super . selectDrawable ( index ) ; int OldFrameIndex = CurrentFrameIndex ; if ( ret ) CurrentFrameIndex = index ; else CurrentFrameIndex = NO_FRAME ; triggerOnFrameChangedListeners ( OldFrameIndex , CurrentFrameIndex ) ; return ret ; }
Set current frame.
Set current frame .