Loading core/res/res/values/colors_material.xml +2 −2 Original line number Diff line number Diff line Loading @@ -72,8 +72,8 @@ <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.10</item> <item name="highlight_alpha_material_dark" format="float" type="dimen">0.10</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> <!-- Primary & accent colors --> Loading graphics/java/android/graphics/drawable/RippleDrawable.java +3 −11 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.SOURCE; import android.animation.ValueAnimator; import android.annotation.ColorInt; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -983,9 +982,9 @@ public class RippleDrawable extends LayerDrawable { RippleShader shader = new RippleShader(); // Grab the color for the current state and cut the alpha channel in // half so that the ripple and background together yield full alpha. final int color = clampAlpha(mMaskColorFilter == null final int color = mMaskColorFilter == null ? mState.mColor.getColorForState(getState(), Color.BLACK) : mMaskColorFilter.getColor()); : mMaskColorFilter.getColor(); final int effectColor = mState.mEffectColor.getColorForState(getState(), Color.MAGENTA); final float noisePhase = AnimationUtils.currentAnimationTimeMillis(); shader.setColor(color, effectColor); Loading @@ -1008,13 +1007,6 @@ public class RippleDrawable extends LayerDrawable { return properties; } private int clampAlpha(@ColorInt int color) { if (Color.alpha(color) < 128) { return (color & 0x00FFFFFF) | 0x80000000; } return color; } @Override public void invalidateSelf() { invalidateSelf(true); Loading Loading @@ -1229,7 +1221,7 @@ public class RippleDrawable extends LayerDrawable { // Grab the color for the current state and cut the alpha channel in // half so that the ripple and background together yield full alpha. final int color = clampAlpha(mState.mColor.getColorForState(getState(), Color.BLACK)); final int color = mState.mColor.getColorForState(getState(), Color.BLACK); final Paint p = mRipplePaint; if (mMaskColorFilter != null) { Loading Loading
core/res/res/values/colors_material.xml +2 −2 Original line number Diff line number Diff line Loading @@ -72,8 +72,8 @@ <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.10</item> <item name="highlight_alpha_material_dark" format="float" type="dimen">0.10</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> <!-- Primary & accent colors --> Loading
graphics/java/android/graphics/drawable/RippleDrawable.java +3 −11 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.SOURCE; import android.animation.ValueAnimator; import android.annotation.ColorInt; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -983,9 +982,9 @@ public class RippleDrawable extends LayerDrawable { RippleShader shader = new RippleShader(); // Grab the color for the current state and cut the alpha channel in // half so that the ripple and background together yield full alpha. final int color = clampAlpha(mMaskColorFilter == null final int color = mMaskColorFilter == null ? mState.mColor.getColorForState(getState(), Color.BLACK) : mMaskColorFilter.getColor()); : mMaskColorFilter.getColor(); final int effectColor = mState.mEffectColor.getColorForState(getState(), Color.MAGENTA); final float noisePhase = AnimationUtils.currentAnimationTimeMillis(); shader.setColor(color, effectColor); Loading @@ -1008,13 +1007,6 @@ public class RippleDrawable extends LayerDrawable { return properties; } private int clampAlpha(@ColorInt int color) { if (Color.alpha(color) < 128) { return (color & 0x00FFFFFF) | 0x80000000; } return color; } @Override public void invalidateSelf() { invalidateSelf(true); Loading Loading @@ -1229,7 +1221,7 @@ public class RippleDrawable extends LayerDrawable { // Grab the color for the current state and cut the alpha channel in // half so that the ripple and background together yield full alpha. final int color = clampAlpha(mState.mColor.getColorForState(getState(), Color.BLACK)); final int color = mState.mColor.getColorForState(getState(), Color.BLACK); final Paint p = mRipplePaint; if (mMaskColorFilter != null) { Loading