a small static helper to set the color to a GradientDrawable null save

@param colorHolder
@param ctx
@param gradientDrawable
169364
public static void applyToOrTransparent(ColorHolder colorHolder, Context ctx, GradientDrawable gradientDrawable) {
        if (colorHolder != null && gradientDrawable != null) {
            colorHolder.applyTo(ctx, gradientDrawable);
        } else if (gradientDrawable != null) {
            gradientDrawable.setColor(Color.TRANSPARENT);
        }
    }
676614
public static void applyDecidedIconOrSetGone(ImageHolder imageHolder, ImageView imageView, int iconColor, boolean tint) {
        if (imageHolder != null && imageView != null) {
            Drawable drawable = ImageHolder.decideIcon(imageHolder, imageView.getContext(), iconColor, tint);
            if (drawable != null) {
                imageView.setImageDrawable(drawable);
                imageView.setVisibility(View.VISIBLE);
            } else if (imageHolder.getBitmap() != null) {
                imageView.setImageBitmap(imageHolder.getBitmap());
                imageView.setVisibility(View.VISIBLE);
            } else {
                imageView.setVisibility(View.GONE);
            }
        } else if (imageView != null) {
            imageView.setVisibility(View.GONE);
        }
    }
1095737
protected int getSelectedColor(Context ctx) {
        if (getBooleanStyleable(ctx, R.styleable.MaterialDrawer_material_drawer_legacy_style, false)) {
            return ColorHolder.color(getSelectedColor(), ctx, R.attr.material_drawer_selected_legacy, R.color.material_drawer_selected_legacy);
        } else {
            return ColorHolder.color(getSelectedColor(), ctx, R.attr.material_drawer_selected, R.color.material_drawer_selected);
        }
    }
1109580
public static Drawable getSelectableItemBackground(Context ctx){
        int[] attrs = new int[] { R.attr.selectableItemBackground /* index 0 */};
        TypedArray ta = ctx.obtainStyledAttributes(attrs);
        Drawable drawableFromTheme = ta.getDrawable(0 /* index */);
        ta.recycle();
        return drawableFromTheme;
    }
850952
public void setBackgroundColor(int color) {
        colorUnpressed = color;

        if(!isSelected()) {
            if (rippleAnimationSupport()) {
                ripple.setRippleBackground(colorUnpressed);
            }
            else {
                view.setBackgroundColor(colorUnpressed);
            }
        }
    }
616792
public static void setTextColor(EfficientCacheView cacheView, int viewId, @ColorInt int color) {
        View view = cacheView.findViewByIdEfficient(viewId);
        if (view instanceof TextView) {
            ((TextView) view).setTextColor(color);
        }
    }
1167168
public void setFillColor(org.kie.dmn.model.api.dmndi.Color value) {
        this.fillColor = value;
    }
679272
public void setArrowColor(@ColorInt int color) {
    arrowColor = color;
    arrowColorDisabled = Utils.lighter(arrowColor, 0.8f);
    if (arrowDrawable != null) {
      arrowDrawable.setColorFilter(arrowColor, PorterDuff.Mode.SRC_IN);
    }
  }
1094099
public void applyToOr(TextView textView, ColorStateList colorDefault) {
        if (mColorInt != 0) {
            textView.setTextColor(mColorInt);
        } else if (mColorRes != -1) {
            textView.setTextColor(ContextCompat.getColor(textView.getContext(), mColorRes));
        } else if (colorDefault != null) {
            textView.setTextColor(colorDefault);
        }
    }
966824
protected int getSelectedTextColor(Context ctx) {
        return ColorHolder.color(getSelectedTextColor(), ctx, R.attr.material_drawer_selected_text, R.color.material_drawer_selected_text);
    }
408233
public void fillWithColor(View view, FakerColorComponent component) {
        validateNotNullableView(view);
        validateNotNullableFakerComponent(component);

        view.setBackgroundColor(component.randomColor());
    }
558200
public void setChromeColor(int color) {
    if (chromeColor != color) {
      viewBorderPaint.setColor(color);
      chromeColor = color;
      invalidate();
    }
  }
55198
public void setColor(Color color) {
		if (color == null) {
			return;
		}
		
		currentColor = new Color(color);
		predraw();
		currentColor.bind();
		postdraw();
	}
1189082
public void setPlaceholderImage(Drawable drawable, ScalingUtils.ScaleType scaleType) {
    setChildDrawableAtIndex(PLACEHOLDER_IMAGE_INDEX, drawable);
    getScaleTypeDrawableAtIndex(PLACEHOLDER_IMAGE_INDEX).setScaleType(scaleType);
  }
775383
public int getIconColor(Context ctx) {
        int iconColor;
        if (this.isEnabled()) {
            iconColor = ColorHolder.color(getIconColor(), ctx, R.attr.material_drawer_primary_icon, R.color.material_drawer_primary_icon);
        } else {
            iconColor = ColorHolder.color(getDisabledIconColor(), ctx, R.attr.material_drawer_hint_icon, R.color.material_drawer_hint_icon);
        }
        return iconColor;
    }
169766
private static GradientDrawable getStandardBackground(int color) {
        final GradientDrawable gradientDrawable = new GradientDrawable();
        gradientDrawable.setCornerRadius(BackgroundUtils.convertToDIP(4));
        gradientDrawable.setColor(color);
        return gradientDrawable;
    }
895922
@Override
    protected int getColor(Context ctx) {
        int color;
        if (this.isEnabled()) {
            color = ColorHolder.color(getTextColor(), ctx, R.attr.material_drawer_secondary_text, R.color.material_drawer_secondary_text);
        } else {
            color = ColorHolder.color(getDisabledTextColor(), ctx, R.attr.material_drawer_hint_text, R.color.material_drawer_hint_text);
        }
        return color;
    }