Lines Matching refs:color
32 * 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 of this activity; animates the change if desired.
72 * @param color the ARGB value to set as the current app window color
75 protected void adjustAppColor(@ColorInt int color, boolean animate) {
76 // Create and install the drawable that defines the window color.
78 mBackground = new ColorDrawable(color);
82 // Cancel the current window color animation if one exists.
88 if (currentColor != color) {
90 mAppColorAnimator = ValueAnimator.ofObject(ARGB_EVALUATOR, currentColor, color)
96 setAppColor(color);
101 private void setAppColor(@ColorInt int color) {
102 mBackground.setColor(color);
106 * Sets the app window color to the current color produced by the animator.
112 final @ColorInt int color = (int) valueAnimator.getAnimatedValue();
113 setAppColor(color);