@Override public int getChangingConfigurations() { return wrapped.getChangingConfigurations(); }
@Override public int getChangingConfigurations() { return mDrawable != null ? mDrawable.getChangingConfigurations() : 0; }
@Override public int getChangingConfigurations() { return mDrawable.getChangingConfigurations(); }
@Override public int getChangingConfigurations() { return mDrawable == null ? UNSET : mDrawable.getChangingConfigurations(); }
@Override public int getChangingConfigurations() { return mDrawable.getChangingConfigurations(); }
@Override public int getChangingConfigurations() { if (mDrawable != null) { return mDrawable.getChangingConfigurations(); } else { return super.getChangingConfigurations(); } }
public int getChangingConfigurations() { return this.mDrawable.getChangingConfigurations(); }
@Override public int getChangingConfigurations() { return super.getChangingConfigurations() | mDrawableContainerState.getChangingConfigurations(); }
public S hasChangingConfigurations(int mask) { isNotNull(); int actualMask = actual.getChangingConfigurations(); assertThat(actualMask) // .overridingErrorMessage("Expected changing configurations <%s> but was <%s>.", mask, actualMask) // .isEqualTo(mask); return myself; }
/** * Creates a new layer drawable with the specified list of layers and the specified constant * state. * * @param layers The list of layers to add to this drawable. * @param state The constant drawable state. */ LayerDrawable(@NonNull Drawable[] layers, @Nullable LayerState state) { this(state, null); if (layers == null) { throw new IllegalArgumentException("layers must be non-null"); } final int length = layers.length; final ChildDrawable[] r = new ChildDrawable[length]; for (int i = 0; i < length; i++) { r[i] = new ChildDrawable(); r[i].mDrawable = layers[i]; layers[i].setCallback(this); mLayerState.mChildrenChangingConfigurations |= layers[i].getChangingConfigurations(); } mLayerState.mNum = length; mLayerState.mChildren = r; ensurePadding(); refreshPadding(); }
/** * Adds the drawable to the end of the list of contained drawables. * * @param dr the drawable to add * @return the position of the drawable within the container */ public final int addChild(Drawable dr) { final int pos = mNumChildren; if (pos >= mDrawables.length) { growArray(pos, pos + 10); } dr.mutate(); dr.setVisible(false, true); dr.setCallback(mOwner); mDrawables[pos] = dr; mNumChildren++; mChildrenChangingConfigurations |= dr.getChangingConfigurations(); invalidateCache(); mConstantPadding = null; mCheckedPadding = false; mCheckedConstantSize = false; mCheckedConstantState = false; return pos; }
layer.mDrawable.getChangingConfigurations(); layer.mDrawable.setCallback(this);
state.mChildrenChangingConfigurations |= d.getChangingConfigurations();
@RequiresApi(Build.VERSION_CODES.LOLLIPOP) final void applyTheme(Theme theme) { if (theme != null) { createAllFutures(); final int count = mNumChildren; final Drawable[] drawables = mDrawables; for (int i = 0; i < count; i++) { if (drawables[i] != null && drawables[i].canApplyTheme()) { drawables[i].applyTheme(theme); // Update cached mask of child changing configurations. mChildrenChangingConfigurations |= drawables[i].getChangingConfigurations(); } } updateDensity(theme.getResources()); } }
/** * Add a new layer to this drawable. The new layer is identified by an id. * * @param dr The drawable to add as a layer. * @param themeAttrs Theme attributes extracted from the layer. * @param id The id of the new layer. * @param left The left padding of the new layer. * @param top The top padding of the new layer. * @param right The right padding of the new layer. * @param bottom The bottom padding of the new layer. */ ChildDrawable addLayer(Drawable dr, int[] themeAttrs, int id, int left, int top, int right, int bottom) { final ChildDrawable childDrawable = createLayer(dr); childDrawable.mId = id; childDrawable.mThemeAttrs = themeAttrs; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) childDrawable.mDrawable.setAutoMirrored(isAutoMirrored()); childDrawable.mInsetL = left; childDrawable.mInsetT = top; childDrawable.mInsetR = right; childDrawable.mInsetB = bottom; addLayer(childDrawable); mLayerState.mChildrenChangingConfigurations |= dr.getChangingConfigurations(); dr.setCallback(this); return childDrawable; }
/** */ @Override public int getChangingConfigurations() { return mDrawable.getChangingConfigurations(); }
/** */ @Override public int getChangingConfigurations() { return mDrawable.getChangingConfigurations(); }
@Override public ConstantState getConstantState() { if (mLayerState.canConstantState()) { mLayerState.mChangingConfigurations = super.getChangingConfigurations(); return mLayerState; } return null; }
@Override public int getChangingConfigurations() { if (mDrawable == null) return super.getChangingConfigurations(); return mDrawable.getChangingConfigurations(); }
public S hasChangingConfigurations(int mask) { isNotNull(); int actualMask = actual.getChangingConfigurations(); assertThat(actualMask) // .overridingErrorMessage("Expected changing configurations <%s> but was <%s>.", mask, actualMask) // .isEqualTo(mask); return myself; }