@Override public void jumpToCurrentState() { mDrawable.jumpToCurrentState(); }
public void jumpToCurrentState() { this.mDrawable.jumpToCurrentState(); }
@Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (foreground != null) foreground.jumpToCurrentState(); }
@Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (mForeground != null) mForeground.jumpToCurrentState(); }
@Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (foreground != null) foreground.jumpToCurrentState(); }
@Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (scrubberDrawable != null) { scrubberDrawable.jumpToCurrentState(); } }
@Override public void jumpToCurrentState() { super.jumpToCurrentState(); stop(); }
@Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (foreground != null) foreground.jumpToCurrentState(); }
@Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (drawable != null) drawable.jumpToCurrentState(); }
@Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (drawable != null) drawable.jumpToCurrentState(); }
@Override public void jumpToCurrentState() { boolean changed = false; if (mLastDrawable != null) { mLastDrawable.jumpToCurrentState(); mLastDrawable = null; mLastIndex = -1; changed = true; } if (mCurrDrawable != null) { mCurrDrawable.jumpToCurrentState(); if (mHasAlpha) { mCurrDrawable.setAlpha(mAlpha); } } if (mExitAnimationEnd != 0) { mExitAnimationEnd = 0; changed = true; } if (mEnterAnimationEnd != 0) { mEnterAnimationEnd = 0; changed = true; } if (changed) { invalidateSelf(); } }
@Override public void jumpToCurrentState() { super.jumpToCurrentState(); if (animator != null) animator.end(); invalidateSelf(); }
@Test public void testJumpDrawablesToCurrentState() { mHost.jumpDrawablesToCurrentState(); Drawable d1 = mock(ColorDrawable.class); when(d1.getBounds()).thenReturn(new Rect()); mount(0, d1); Drawable d2 = mock(ColorDrawable.class); when(d2.getBounds()).thenReturn(new Rect()); mount(1, d2); View v1 = mock(View.class); mount(2, v1); mHost.jumpDrawablesToCurrentState(); verify(d1, times(1)).jumpToCurrentState(); verify(d2, times(1)).jumpToCurrentState(); }
@Override protected void drawableStateChanged() { super.drawableStateChanged(); if (ThemeUtils.isSkipAnimatedSelector()) { Drawable drawable = CompoundButtonCompat.getButtonDrawable(this); try { if (ThemeUtils.getWrapperDrawable(drawable) instanceof AnimatedStateListDrawable) { drawable.jumpToCurrentState(); } } catch (NoClassDefFoundError error) { error.printStackTrace(); } } }
@Override protected void drawableStateChanged() { super.drawableStateChanged(); if (ThemeUtils.isSkipAnimatedSelector()) { Drawable drawable = CompoundButtonCompat.getButtonDrawable(this); try { if (ThemeUtils.getWrapperDrawable(drawable) instanceof AnimatedStateListDrawable) { drawable.jumpToCurrentState(); } } catch (NoClassDefFoundError error) { error.printStackTrace(); } } }
public void release(Drawable drawable, int resId) { SimplePoolWithCount<Drawable> drawablesPool = mDrawableCache.get(resId); if (drawablesPool == null) { drawablesPool = new SimplePoolWithCount<>(DRAWABLES_POOL_MAX_ITEMS); mDrawableCache.put(resId, drawablesPool); } // Reset a stateful drawable, and its animations, before being released. if (drawable.isStateful()) { drawable.setState(StateSet.WILD_CARD); if (SDK_INT >= HONEYCOMB) { drawable.jumpToCurrentState(); } } drawablesPool.release(drawable); }
@Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (foreground != null) foreground.jumpToCurrentState(); }
@Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (mForegroundSelector != null) mForegroundSelector.jumpToCurrentState(); }
@CallSuper @Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); if (mDividerDrawable != null) { mDividerDrawable.jumpToCurrentState(); } }
@Override public void jumpDrawablesToCurrentState() { super.jumpDrawablesToCurrentState(); for (Thumb thumb : mThumbs) { if (thumb.getThumb() != null) thumb.getThumb().jumpToCurrentState(); } }