android.graphics.drawable.Drawable.getChangingConfigurations()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中android.graphics.drawable.Drawable.getChangingConfigurations()方法的一些代码示例,展示了Drawable.getChangingConfigurations()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawable.getChangingConfigurations()方法的具体详情如下:
包路径:android.graphics.drawable.Drawable
类名称:Drawable
方法名:getChangingConfigurations

Drawable.getChangingConfigurations介绍

暂无

代码示例

代码示例来源:origin: bumptech/glide

@Override
public int getChangingConfigurations() {
 return wrapped.getChangingConfigurations();
}

代码示例来源:origin: rey5137/material

@Override
public int getChangingConfigurations() {
  return mDrawable != null ? mDrawable.getChangingConfigurations() : 0;
}

代码示例来源:origin: facebook/litho

@Override
public int getChangingConfigurations() {
 return mDrawable.getChangingConfigurations();
}

代码示例来源:origin: facebook/litho

@Override
public int getChangingConfigurations() {
 return mDrawable == null ? UNSET : mDrawable.getChangingConfigurations();
}

代码示例来源:origin: facebook/litho

@Override
public int getChangingConfigurations() {
 return mDrawable.getChangingConfigurations();
}

代码示例来源:origin: seven332/EhViewer

@Override
public int getChangingConfigurations() {
  if (mDrawable != null) {
    return mDrawable.getChangingConfigurations();
  } else {
    return super.getChangingConfigurations();
  }
}

代码示例来源:origin: seven332/EhViewer

public int getChangingConfigurations() {
 return this.mDrawable.getChangingConfigurations();
}

代码示例来源:origin: DreaminginCodeZH/MaterialProgressBar

@Override
public int getChangingConfigurations() {
  return super.getChangingConfigurations()
      | mDrawableContainerState.getChangingConfigurations();
}

代码示例来源:origin: square/assertj-android

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;
}

代码示例来源:origin: ZieIony/Carbon

/**
 * 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();
}

代码示例来源:origin: DreaminginCodeZH/MaterialProgressBar

/**
 * 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;
}

代码示例来源:origin: ZieIony/Carbon

layer.mDrawable.getChangingConfigurations();
layer.mDrawable.setCallback(this);

代码示例来源:origin: ZieIony/Carbon

state.mChildrenChangingConfigurations |= d.getChangingConfigurations();

代码示例来源:origin: DreaminginCodeZH/MaterialProgressBar

@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());
  }
}

代码示例来源:origin: ZieIony/Carbon

/**
 * 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;
}

代码示例来源:origin: com.albedinsky.android/ui-graphics

/**
 */
@Override
public int getChangingConfigurations() {
  return mDrawable.getChangingConfigurations();
}

代码示例来源:origin: com.albedinsky.android/ui-graphics-base

/**
 */
@Override
public int getChangingConfigurations() {
  return mDrawable.getChangingConfigurations();
}

代码示例来源:origin: PrivacyApps/document-viewer

@Override
public ConstantState getConstantState() {
  if (mLayerState.canConstantState()) {
    mLayerState.mChangingConfigurations = super.getChangingConfigurations();
    return mLayerState;
  }
  return null;
}

代码示例来源:origin: AlexMofer/ProjectX

@Override
public int getChangingConfigurations() {
  if (mDrawable == null)
    return super.getChangingConfigurations();
  return mDrawable.getChangingConfigurations();
}

代码示例来源:origin: com.squareup.assertj/assertj-android

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;
}

相关文章