Home | History | Annotate | Download | only in util

Lines Matching defs:color

21 import android.graphics.Color;
38 * Given a color and a SwitchCompat view, updates the SwitchCompat to appear with the appropiate
39 * color when enabled and checked
41 public static void updateSwitchCompatColor(SwitchCompat switchCompat, final int color) {
46 getSwitchThumbColorStateList(context, color, typedValue),
50 getSwitchTrackColorStateList(context, color, typedValue), PorterDuff.Mode.SRC_IN));
67 final int color, final TypedValue typedValue) {
73 colors[i] = getColor(Color.parseColor("#ffbdbdbd"), 1f);
76 colors[i] = color;
87 final int color, final TypedValue typedValue) {
96 colors[i] = getColor(color, 0.3f);
120 final int color = getThemeAttrColor(context, typedValue, attr);
121 return getColor(color, alpha);
124 private static int getColor(int color, float alpha) {
125 final int originalAlpha = Color.alpha(color);
126 // Return the color, multiplying the original alpha by the disabled value
127 return (color & 0x00ffffff) | (Math.round(originalAlpha * alpha) << 24);