public SimpleColorFilter(@ColorInt int color) { super(color, PorterDuff.Mode.SRC_ATOP); } }
public DocumentData(String text, String fontName, double size, Justification justification, int tracking, double lineHeight, double baselineShift, @ColorInt int color, @ColorInt int strokeColor, double strokeWidth, boolean strokeOverFill) { this.text = text; this.fontName = fontName; this.size = size; this.justification = justification; this.tracking = tracking; this.lineHeight = lineHeight; this.baselineShift = baselineShift; this.color = color; this.strokeColor = strokeColor; this.strokeWidth = strokeWidth; this.strokeOverFill = strokeOverFill; }
public FancyQuoteSpan(int quoteLineWidth, int quoteLineIndent, @ColorInt int quoteLineColor) { super(); lineWidth = quoteLineWidth; gapWidth = quoteLineIndent; lineColor = quoteLineColor; }
/** * Set the background color for the Slider. * This is the view containing the list. * * @param sliderBackgroundColor * @return */ public DrawerBuilder withSliderBackgroundColor(@ColorInt int sliderBackgroundColor) { this.mSliderBackgroundColor = sliderBackgroundColor; return this; }
public TextColorSpan(@ColorInt int color) { super(color); this.color = color; }
public Options setBlockQuoteTextColor(@ColorInt int color) { mBlockQuoteTextColor = color; return this; }
public Options setHruleColor(@ColorInt int color) { mHruleColor = color; return this; }
public Options setBlockQuoteLineColor(@ColorInt int color) { mBlockQuoteLineColor = color; return this; }
public @ColorInt int getColor() { return color; }
public void setColor(@ColorInt int color) { this.color = color; }
public MorphDrawable(@ColorInt int color, float cornerRadius) { this.cornerRadius = cornerRadius; paint = new Paint(Paint.ANTI_ALIAS_FLAG); paint.setColor(color); }
/** * Configure {@code intent} with the extras needed to initialize this transition. */ public static void addExtras(@NonNull Intent intent, @ColorInt int startColor, int startCornerRadius) { intent.putExtra(EXTRA_SHARED_ELEMENT_START_COLOR, startColor); intent.putExtra(EXTRA_SHARED_ELEMENT_START_CORNER_RADIUS, startCornerRadius); }
public GridItemDividerDecoration(@Dimension int dividerSize, @ColorInt int dividerColor) { this.dividerSize = dividerSize; paint = new Paint(); paint.setColor(dividerColor); paint.setStyle(Paint.Style.FILL); }
/** * Check if a color is dark (convert to XYZ & check Y component) */ public static boolean isDark(@ColorInt int color) { return androidx.core.graphics.ColorUtils.calculateLuminance(color) < 0.5; }
/** * Configure {@code intent} with the extras needed to initialize this transition. */ public static void addExtras(@NonNull Intent intent, @ColorInt int fabColor, @DrawableRes int fabIconResId) { intent.putExtra(EXTRA_FAB_COLOR, fabColor); intent.putExtra(EXTRA_FAB_ICON_RES_ID, fabIconResId); }
public void setScrimColor(@ColorInt int scrimColor) { if (this.scrimColor != scrimColor) { this.scrimColor = scrimColor; postInvalidateOnAnimation(); } }
public void setBorderColor(@ColorInt int borderColor) { if (borderColor == mBorderColor) { return; } mBorderColor = borderColor; mBorderPaint.setColor(mBorderColor); invalidate(); }
public void setCircleBackgroundColor(@ColorInt int circleBackgroundColor) { if (circleBackgroundColor == mCircleBackgroundColor) { return; } mCircleBackgroundColor = circleBackgroundColor; mCircleBackgroundPaint.setColor(circleBackgroundColor); invalidate(); }
public void setColor(@ColorInt int color) { paint.setColor(color); invalidateSelf(); }