Searched refs:color (Results 1 - 25 of 477) sorted by relevance

1234567891011>>

/packages/apps/DeskClock/src/com/android/deskclock/
H A DBaseActivity.java32 * Base activity class that changes the app window's color based on the current hour.
36 /** Sets the app window color on each frame of the {@link #mAppColorAnimator}. */
40 /** The current animator that is changing the app window color or {@code null}. */
43 /** Draws the app window's color. */
56 final @ColorInt int color = ThemeUtils.resolveColor(this, android.R.attr.windowBackground);
57 adjustAppColor(color, false /* animate */);
64 // Ensure the app window color is up-to-date.
65 final @ColorInt int color = ThemeUtils.resolveColor(this, android.R.attr.windowBackground);
66 adjustAppColor(color, false /* animate */);
70 * Adjusts the current app window color o
75 adjustAppColor(@olorInt int color, boolean animate) argument
101 setAppColor(@olorInt int color) argument
[all...]
/packages/apps/Contacts/src/com/android/contacts/drawer/
H A DScrimDrawable.java29 * Default constructor. Uses default color.
36 * Set a color if necessary.
38 * @param color
40 public ScrimDrawable(int color) { argument
41 super(color);
/packages/apps/Gallery2/jni/filters/
H A Dfilters.h28 #define GetA(color) (((color) >> 24) & 0xFF)
29 #define GetB(color) (((color) >> 16) & 0xFF)
30 #define GetG(color) (((color) >> 8) & 0xFF)
31 #define GetR(color) (((color) >> 0) & 0xFF)
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/
H A DGLPaint.java25 public void setColor(int color) { argument
26 mColor = color;
H A DStringTexture.java30 // the String, the font size, and the color.
44 public static TextPaint getDefaultPaint(float textSize, int color) { argument
48 paint.setColor(color);
54 String text, float textSize, int color) {
55 return newInstance(text, getDefaultPaint(textSize, color));
59 String text, float textSize, int color,
61 TextPaint paint = getDefaultPaint(textSize, color);
53 newInstance( String text, float textSize, int color) argument
58 newInstance( String text, float textSize, int color, float lengthLimit, boolean isBold) argument
H A DFadeInTexture.java20 // FadeInTexture is a texture which begins with a color, then gradually animates
29 public FadeInTexture(int color, TiledTexture texture) { argument
31 mColor = color;
/packages/apps/Email/tests/src/com/android/email/
H A DResourceHelperTest.java39 Integer color = mResourceHelper.getAccountColor(accountId);
43 assertNotNull(color);
45 assertFalse(color.equals(lastColor));
48 lastColor = color;
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/
H A DColorChecker.java35 * {@link R.color#car_tint_light} and
36 * {@link R.color#car_tint_dark}
39 int lightTintColor = context.getResources().getColor(R.color.car_tint_light);
40 int darkTintColor = context.getResources().getColor(R.color.car_tint_dark);
47 * {@link R.color#car_tint_light} and
48 * {@link R.color#car_tint_dark}
51 int lightTintColor = context.getResources().getColor(R.color.car_tint_light);
52 int darkTintColor = context.getResources().getColor(R.color.car_tint_dark);
73 * Determines what color to tint icons given the background color tha
116 getLuminance(int color) argument
[all...]
H A DFabDrawable.java33 * When not focused or pressed, the fab will be a solid circle of the color specified with
35 * and it will gain a stroke that has the color specified with {@link #setStrokeColor(int)}.
92 * @param color The primary color of the fab. It will be the entire fab color when not selected
93 * or pressed and will be the color of the interior circle when selected
96 public void setFabColor(int color) { argument
97 mFabPaint.setColor(color);
101 * @param color The color o
104 setStrokeColor(int color) argument
112 setFabAndStrokeColor(int color) argument
120 setFabAndStrokeColor(int color, float valueMultiplier) argument
[all...]
/packages/apps/Dialer/java/com/android/incallui/
H A DInCallUIMaterialColorMapUtils.java42 final int primaryColor = resources.getColor(R.color.dialer_theme_color);
43 final int secondaryColor = resources.getColor(R.color.dialer_theme_color_dark);
48 * Currently the InCallUI color will only vary by SIM color which is a list of colors defined in
49 * the background_colors array, so first search the list for the matching color and fall back to
50 * the closest matching color if an exact match does not exist.
53 public MaterialPalette calculatePrimaryAndSecondaryColor(int color) { argument
54 if (color == PhoneAccount.NO_HIGHLIGHT_COLOR) {
59 if (mPrimaryColors.getColor(i, 0) == color) {
64 // The color is
[all...]
H A DThemeColorManager.java32 * Calculates the background color for the in call window. The background color is based on the SIM
46 * determine the theme color for InCallUI.
71 colorMap.calculatePrimaryAndSecondaryColor(R.color.incall_call_spam_background_color);
72 backgroundColorTop = context.getColor(R.color.incall_background_gradient_spam_top);
73 backgroundColorMiddle = context.getColor(R.color.incall_background_gradient_spam_middle);
74 backgroundColorBottom = context.getColor(R.color.incall_background_gradient_spam_bottom);
75 backgroundColorSolid = context.getColor(R.color.incall_background_multiwindow_spam);
79 backgroundColorTop = context.getColor(R.color.incall_background_gradient_top);
80 backgroundColorMiddle = context.getColor(R.color
139 applyAlpha(@olorInt int color, @ColorInt int sourceColorWithAlpha) argument
[all...]
/packages/apps/Car/Radio/src/com/android/car/radio/
H A DRadioChannelColorMapper.java26 * A class that will take a {@link RadioStation} and return its corresponding color. The colors
53 mDefaultColor = context.getColor(R.color.car_radio_bg_color);
54 mAmRange1Color = context.getColor(R.color.am_range_1_bg_color);
55 mAmRange2Color = context.getColor(R.color.am_range_2_bg_color);
56 mAmRange3Color = context.getColor(R.color.am_range_3_bg_color);
57 mFmRange1Color = context.getColor(R.color.fm_range_1_bg_color);
58 mFmRange2Color = context.getColor(R.color.fm_range_2_bg_color);
59 mFmRange3Color = context.getColor(R.color.fm_range_3_bg_color);
63 * Returns the default color for the radio.
71 * Convenience method for returning a color base
[all...]
/packages/apps/Launcher3/src/com/android/launcher3/graphics/
H A DIconPalette.java34 * Contains colors based on the dominant color of an icon.
54 private IconPalette(int color, boolean desaturateBackground) { argument
55 dominantColor = color;
63 // Get slightly more saturated background color.
72 * Returns a color suitable for the progress bar color of preload icon.
77 // Make sure that the dominant color has enough saturation to be visible properly.
95 * If that color is Color.TRANSPARENT, then returns null instead.
98 int badgeColor = resources.getColor(R.color.badge_color);
114 int badgeColor = resources.getColor(R.color
128 resolveContrastColor(Context context, int color, int background) argument
151 resolveColor(Context context, int color) argument
171 ensureTextContrast(int color, int bg) argument
211 getMutedColor(int color, float whiteScrimAlpha) argument
220 getLowContrastColor(int color) argument
224 getLighterOrDarkerVersionOfColor(int color, float contrastRatio) argument
[all...]
/packages/apps/Launcher3/src/com/android/launcher3/util/
H A DThemes.java66 * Scales a color matrix such that, when applied to color R G B A, it produces R' G' B' A' where
74 * @param color The color r g b a
77 public static void setColorScaleOnMatrix(int color, ColorMatrix target) { argument
78 target.setScale(Color.red(color) / 255f, Color.green(color) / 255f,
79 Color.blue(color) / 255f, Color.alpha(color) / 255f);
/packages/apps/Messaging/src/com/android/messaging/util/
H A DTintDrawableWrapper.java30 * A {@link DrawableWrapper} which updates it's color filter using a {@link ColorStateList}.
57 final int color = mTintStateList.getColorForState(state, mCurrentColor);
58 if (color != mCurrentColor) {
59 if (color != Color.TRANSPARENT) {
60 setColorFilter(color, mTintMode);
64 mCurrentColor = color;
H A DSwitchCompatUtils.java38 * 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) { argument
46 getSwitchThumbColorStateList(context, color, typedValue),
50 getSwitchTrackColorStateList(context, color, typedValue), PorterDuff.Mode.SRC_IN));
67 final int color, final TypedValue typedValue) {
76 colors[i] = color;
87 final int color, final TypedValue typedValue) {
96 colors[i] = getColor(color, 0.3f);
120 final int color
66 getSwitchThumbColorStateList(final Context context, final int color, final TypedValue typedValue) argument
86 getSwitchTrackColorStateList(final Context context, final int color, final TypedValue typedValue) argument
124 getColor(int color, float alpha) argument
[all...]
/packages/apps/Contacts/src/com/android/contacts/util/
H A DMaterialColorMapUtils.java109 * Return primary and secondary colors from the Material color palette that are similar to
110 * {@param color}.
112 public MaterialPalette calculatePrimaryAndSecondaryColor(int color) { argument
115 final float colorHue = hue(color);
121 // No need to be perceptually accurate when calculating color distances since
138 R.color.quickcontact_default_photo_tint_color);
140 R.color.quickcontact_default_photo_tint_color_dark);
145 * Returns the hue component of a color int.
149 public static float hue(int color) { argument
150 int r = (color >> 1
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/bitmap/
H A DColorPicker.java26 * Returns the color to use for the given email address.
29 * @return The color value in the format {@code 0xAARRGGBB}.
48 * Default color returned if the one chosen from {@code R.array.letter_tile_colors} is
57 sDefaultColor = res.getColor(R.color.letter_tile_default_color);
63 final int color = Math.abs(email.hashCode()) % sColorCount;
64 return sColors.getColor(color, sDefaultColor);
/packages/apps/UnifiedEmail/src/com/android/mail/graphics/
H A DPageMarginDrawable.java35 int insetRight, int insetBottom, int color) {
38 mPaint.setColor(color);
34 PageMarginDrawable(Drawable drawable, int insetLeft, int insetTop, int insetRight, int insetBottom, int color) argument
/packages/apps/Messaging/src/com/android/messaging/ui/
H A DConversationDrawables.java33 // Cache the color filtered bubble drawables so that we don't need to create a
98 mOutgoingBubbleColor = resources.getColor(R.color.message_bubble_color_outgoing);
100 resources.getColor(R.color.message_error_bubble_color_incoming);
102 resources.getColor(R.color.message_audio_button_color_incoming);
103 mSelectedBubbleColor = resources.getColor(R.color.message_bubble_color_selected);
104 mThemeColor = resources.getColor(R.color.primary_color);
123 int color;
125 color = mSelectedBubbleColor;
128 color = mIncomingErrorBubbleColor;
130 color
[all...]
/packages/apps/TV/src/com/android/tv/dvr/ui/browse/
H A DDetailsViewBackgroundHelper.java76 * Sets the background color.
78 public void setBackgroundColor(int color) { argument
80 mBackgroundManager.setColor(color);
87 public void setScrim(int color) { argument
89 mBackgroundManager.setDimLayer(new ColorDrawable(color));
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/
H A DDefaultSoftKeyboard.java644 text1.setTextColor(res.getColor(R.color.indicator_textcolor_caps_off));
645 text2.setTextColor(res.getColor(R.color.indicator_textcolor_alt_off));
646 text1.setBackgroundColor(res.getColor(R.color.indicator_textbackground_default));
647 text2.setBackgroundColor(res.getColor(R.color.indicator_textbackground_default));
650 text1.setTextColor(res.getColor(R.color.indicator_textcolor_caps_on));
651 text2.setTextColor(res.getColor(R.color.indicator_textcolor_alt_off));
652 text1.setBackgroundColor(res.getColor(R.color.indicator_textbackground_default));
653 text2.setBackgroundColor(res.getColor(R.color.indicator_textbackground_default));
656 text1.setTextColor(res.getColor(R.color.indicator_textcolor_caps_lock));
657 text2.setTextColor(res.getColor(R.color
[all...]
/packages/apps/TV/src/com/android/tv/dvr/ui/
H A DFadeBackground.java35 * This transition fades in/out of the background of the view by changing the background color.
61 int color = ((ColorDrawable) background).getColor();
62 int transparentColor = Color.argb(0, Color.red(color), Color.green(color),
63 Color.blue(color));
65 ? ObjectAnimator.ofArgb(background, "color", transparentColor)
66 : ObjectAnimator.ofArgb(background, "color", transparentColor, color);
/packages/apps/Car/libs/car-stream-ui-lib/src/com/android/car/view/
H A DPagedScrollBarView.java155 int color = getResources().getColor(R.color.car_tint);
156 mUpButton.setColorFilter(color, PorterDuff.Mode.SRC_IN);
158 mDownButton.setColorFilter(color, PorterDuff.Mode.SRC_IN);
161 mScrollThumb.setBackgroundColor(color);
166 int color = getResources().getColor(R.color.car_tint_light);
167 mUpButton.setColorFilter(color, PorterDuff.Mode.SRC_IN);
169 mDownButton.setColorFilter(color, PorterDuff.Mode.SRC_IN);
172 mScrollThumb.setBackgroundColor(color);
[all...]
/packages/apps/Calendar/src/com/android/calendar/selectcalendars/
H A DCalendarColorSquare.java29 * The color square used as an entry point to launching the {@link CalendarColorPickerDialog}.
42 public void setBackgroundColor(int color) { argument
45 setImageDrawable(new ColorStateDrawable(colorDrawable, color));

Completed in 1829 milliseconds

1234567891011>>