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

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

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

Drawable.getColorFilter介绍

暂无

代码示例

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

/**
 */
@Override
@SuppressLint("NewApi")
public ColorFilter getColorFilter() {
  return UiConfig.MATERIALIZED ? mDrawable.getColorFilter() : null;
}

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

/**
 */
@Override
@SuppressLint("NewApi")
public ColorFilter getColorFilter() {
  return UiConfig.MATERIALIZED ? mDrawable.getColorFilter() : null;
}

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

/**
 */
@Override
@SuppressLint("NewApi")
public ColorFilter getColorFilter() {
  return UiConfig.MATERIALIZED ? mDrawable.getColorFilter() : null;
}

代码示例来源:origin: MCMrARM/revolution-irc

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public ColorFilter getColorFilter() {
  return mDrawable.getColorFilter();
}

代码示例来源:origin: jbruchanov/AnUitor

data.put("ColorFilter", String.valueOf(d.getColorFilter()));
data.put("DirtyBounds", d.getDirtyBounds().toShortString());

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

/**
 * Creates a new instance of DrawableWrapper which wraps the given <var>drawable</var>.
 *
 * @param drawable The drawable to wrap.
 */
public DrawableWrapper(@NonNull Drawable drawable) {
  this.mDrawable = drawable;
  /**
   * Copy current state of the wrapped drawable.
   */
  setState(drawable.getState());
  setBounds(drawable.getBounds());
  setLevel(drawable.getLevel());
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    setCallback(drawable.getCallback());
  } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    setAlpha(drawable.getAlpha());
  } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    setColorFilter(drawable.getColorFilter());
  }
  mDrawable.setCallback(this);
}

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

/**
 * Creates a new instance of DrawableWrapper which wraps the given <var>drawable</var>.
 *
 * @param drawable The drawable to wrap.
 */
public DrawableWrapper(@NonNull Drawable drawable) {
  this.mDrawable = drawable;
  /**
   * Copy current state of the wrapped drawable.
   */
  setState(drawable.getState());
  setBounds(drawable.getBounds());
  setLevel(drawable.getLevel());
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    setCallback(drawable.getCallback());
  } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    setAlpha(drawable.getAlpha());
  } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    setColorFilter(drawable.getColorFilter());
  }
  mDrawable.setCallback(this);
}

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

/**
 * Creates a new instance of DrawableWrapper which wraps the given <var>drawable</var>.
 *
 * @param drawable The drawable to wrap.
 */
public DrawableWrapper(@NonNull Drawable drawable) {
  this.mDrawable = drawable;
  /**
   * Copy current state of the wrapped drawable.
   */
  setState(drawable.getState());
  setBounds(drawable.getBounds());
  setLevel(drawable.getLevel());
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    setCallback(drawable.getCallback());
  } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
    setAlpha(drawable.getAlpha());
  } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    setColorFilter(drawable.getColorFilter());
  }
  mDrawable.setCallback(this);
}

相关文章