summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lucas Dupin <dupin@google.com> 2023-05-19 00:55:39 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-05-19 00:55:39 +0000
commit0814c2ddc880d0b0b1ff37b4aaeeeb58c90cab55 (patch)
treee4109a33b65de9799b7ea7d01976f727593f8a3b
parentb42ac69390ca344811047a739de49154b05dc51f (diff)
parentf0c528ab6ed64b3a551d555bf7cb77f39c571fd7 (diff)
Merge "Fix RippleDrawable alpha" into udc-dev
-rw-r--r--core/res/res/values/colors_material.xml6
-rw-r--r--graphics/java/android/graphics/drawable/RippleDrawable.java3
2 files changed, 5 insertions, 4 deletions
diff --git a/core/res/res/values/colors_material.xml b/core/res/res/values/colors_material.xml
index a99ba152510e..5b0dd308d05f 100644
--- a/core/res/res/values/colors_material.xml
+++ b/core/res/res/values/colors_material.xml
@@ -72,9 +72,9 @@
<item name="secondary_content_alpha_material_dark" format="float" type="dimen">.7</item>
<item name="secondary_content_alpha_material_light" format="float" type="dimen">0.60</item>
- <item name="highlight_alpha_material_light" format="float" type="dimen">0.5</item>
- <item name="highlight_alpha_material_dark" format="float" type="dimen">0.5</item>
- <item name="highlight_alpha_material_colored" format="float" type="dimen">0.10</item>
+ <item name="highlight_alpha_material_light" format="float" type="dimen">0.20</item>
+ <item name="highlight_alpha_material_dark" format="float" type="dimen">0.20</item>
+ <item name="highlight_alpha_material_colored" format="float" type="dimen">0.20</item>
<!-- Primary & accent colors -->
<eat-comment />
diff --git a/graphics/java/android/graphics/drawable/RippleDrawable.java b/graphics/java/android/graphics/drawable/RippleDrawable.java
index 4d0a05811dbf..641a2ae7b2c3 100644
--- a/graphics/java/android/graphics/drawable/RippleDrawable.java
+++ b/graphics/java/android/graphics/drawable/RippleDrawable.java
@@ -1013,7 +1013,8 @@ public class RippleDrawable extends LayerDrawable {
}
p.setShader(shader);
p.setColorFilter(null);
- p.setColor(color);
+ // Alpha is handled by the shader (and color is a no-op because there's a shader)
+ p.setColor(0xFF000000);
return properties;
}