@Override
    protected boolean onStateChange(int[] stateSet) {
        final boolean changed = super.onStateChange(stateSet);
        int idx = mAnimationScaleListState.getCurrentDrawableIndexBasedOnScale();
        return selectDrawable(idx) || changed;
    }
@ Override protected boolean onStateChange ( int [ ] stateSet ) { final boolean changed = super . onStateChange ( stateSet ) ; int idx = mAnimationScaleListState . getCurrentDrawableIndexBasedOnScale ( ) ; return selectDrawable ( idx ) || changed ; }
Set the current drawable according to the animation scale. If scale is 0, then pick the
static drawable, otherwise, pick the animatable drawable.