@Override public boolean isStateful() { return mDrawable.isStateful(); }
@Override public boolean isStateful() { return mDrawable != null && mDrawable.isStateful(); }
@Override public boolean isStateful() { return mBackgroundDrawable != null && mBackgroundDrawable.isStateful(); }
@Override public boolean isStateful() { return mDrawable != null && mDrawable.isStateful(); }
@Override public boolean isStateful() { return mDrawable.isStateful(); }
@Override public boolean isStateful() { return super.isStateful() || (mTint != null && mTint.isStateful()); }
@Override protected void drawableStateChanged() { super.drawableStateChanged(); if (foreground != null && foreground.isStateful()) { foreground.setState(getDrawableState()); } }
@Override protected void drawableStateChanged() { super.drawableStateChanged(); if (foreground != null && foreground.isStateful()) { foreground.setState(getDrawableState()); } }
@Override protected void drawableStateChanged() { super.drawableStateChanged(); if (mForeground != null && mForeground.isStateful()) { mForeground.setState(getDrawableState()); } }
private void updateDrawableState() { if (scrubberDrawable != null && scrubberDrawable.isStateful() && scrubberDrawable.setState(getDrawableState())) { invalidate(); } }
@Override protected void drawableStateChanged() { super.drawableStateChanged(); final Drawable d = mMarginDrawable; if (d != null && d.isStateful()) { d.setState(getDrawableState()); } }
@Override protected void drawableStateChanged() { super.drawableStateChanged(); final Drawable d = mMarginDrawable; if (d != null && d.isStateful()) { d.setState(getDrawableState()); } }
@Override protected void drawableStateChanged() { super.drawableStateChanged(); final Drawable d = mMarginDrawable; if (d != null && d.isStateful()) { d.setState(getDrawableState()); } }
/** * Sets the state on a drawable if it is clickable or should duplicate its parent's state. */ static void maybeSetDrawableState(View view, Drawable drawable, int flags, NodeInfo nodeInfo) { final boolean shouldSetState = (nodeInfo != null && nodeInfo.hasTouchEventHandlers()) || MountItem.isDuplicateParentState(flags); if (shouldSetState && drawable.isStateful()) { drawable.setState(view.getDrawableState()); } }
@Override protected void drawableStateChanged() { super.drawableStateChanged(); if (mMaskDrawable != null && mMaskDrawable.isStateful()) { mMaskDrawable.setState(getDrawableState()); } if (isDuplicateParentStateEnabled()) { ViewCompat.postInvalidateOnAnimation(this); } }
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); }
private void updateBackgroundTint() { Drawable background = getBackground(); if (background instanceof RippleDrawable) background = ((RippleDrawable) background).getBackground(); if (background == null) return; Carbon.setTintList(background, backgroundTint); Carbon.setTintMode(background, backgroundTintMode); if (background.isStateful()) background.setState(getDrawableState()); }
private void updateBackgroundTint() { Drawable background = getBackground(); if (background instanceof RippleDrawable) background = ((RippleDrawable) background).getBackground(); if (background == null) return; Carbon.setTintList(background, backgroundTint); Carbon.setTintMode(background, backgroundTintMode); if (background.isStateful()) background.setState(getDrawableState()); }
private void updateBackgroundTint() { Drawable background = getBackground(); if (background instanceof RippleDrawable) background = ((RippleDrawable) background).getBackground(); if (background == null) return; Carbon.setTintList(background, backgroundTint); Carbon.setTintMode(background, backgroundTintMode); if (background.isStateful()) background.setState(getDrawableState()); }
private void updateBackgroundTint() { Drawable background = getBackground(); if (background instanceof RippleDrawable) background = ((RippleDrawable) background).getBackground(); if (background == null) return; Carbon.setTintList(background, backgroundTint); Carbon.setTintMode(background, backgroundTintMode); if (background.isStateful()) background.setState(getDrawableState()); }