Lines Matching refs:alpha
104 * Starting with API 23, items may optionally define an {@link android.R.attr#alpha android:alpha}
107 * calculated by multiplying by the base color's alpha channel by the {@code alpha} value. For
112 * android:alpha="0.5" />
281 * one but where each color has the specified alpha value (0-255).
283 * @param alpha The new alpha channel value (0-255).
287 public ColorStateList withAlpha(int alpha) {
291 colors[i] = (mColors[i] & 0xFFFFFF) | (alpha << 24);
342 case R.attr.alpha:
352 // Apply alpha modulation. If we couldn't resolve the color or
353 // alpha yet, the default values leave us enough information to
428 // color's alpha channel is either full-opacity (if we
429 // haven't resolved the alpha modulation yet) or
431 defaultAlphaMod = Color.alpha(mColors[i]) / 255.0f;
505 final int baseAlpha = Color.alpha(baseColor);
506 final int alpha = MathUtils.constrain((int) (baseAlpha * alphaMod + 0.5f), 0, 255);
507 return (baseColor & 0xFFFFFF) | (alpha << 24);
534 * color returned from {@link #getColorForState(int[], int)} has an alpha
655 if (Color.alpha(colors[i]) != 0xFF) {