Loading core/res/res/values/colors_material.xml +3 −3 Original line number Diff line number Diff line Loading @@ -77,9 +77,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.54</item> <item name="highlight_alpha_material_light" format="float" type="dimen">0.12</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.26</item> <item name="highlight_alpha_material_light" format="float" type="dimen">0.16</item> <item name="highlight_alpha_material_dark" format="float" type="dimen">0.32</item> <item name="highlight_alpha_material_colored" format="float" type="dimen">0.48</item> <!-- Primary & accent colors --> <eat-comment /> Loading graphics/java/android/graphics/drawable/RippleBackground.java +2 −7 Original line number Diff line number Diff line Loading @@ -16,17 +16,12 @@ package android.graphics.drawable; import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.TimeInterpolator; import android.graphics.Canvas; import android.graphics.CanvasProperty; import android.graphics.Paint; import android.graphics.Rect; import android.util.FloatProperty; import android.view.DisplayListCanvas; import android.view.RenderNodeAnimator; import android.view.animation.LinearInterpolator; /** Loading Loading @@ -78,8 +73,8 @@ class RippleBackground extends RippleComponent { private void onStateChanged(boolean animateChanged) { float newOpacity = 0.0f; if (mHovered) newOpacity += 1.0f; if (mFocused) newOpacity += 1.0f; if (mHovered) newOpacity += .25f; if (mFocused) newOpacity += .75f; if (mAnimator != null) { mAnimator.cancel(); mAnimator = null; Loading graphics/java/android/graphics/drawable/RippleDrawable.java +4 −8 Original line number Diff line number Diff line Loading @@ -264,8 +264,8 @@ public class RippleDrawable extends LayerDrawable { } setRippleActive(enabled && pressed); setBackgroundActive(hovered, focused); return changed; } Loading Loading @@ -879,22 +879,18 @@ 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 = mState.mColor.getColorForState(getState(), Color.BLACK); final int halfAlpha = (Color.alpha(color) / 2) << 24; final Paint p = mRipplePaint; if (mMaskColorFilter != null) { // The ripple timing depends on the paint's alpha value, so we need // to push just the alpha channel into the paint and let the filter // handle the full-alpha color. final int fullAlphaColor = color | (0xFF << 24); mMaskColorFilter.setColor(fullAlphaColor); p.setColor(halfAlpha); mMaskColorFilter.setColor(color | 0xFF000000); p.setColor(color & 0xFF000000); p.setColorFilter(mMaskColorFilter); p.setShader(mMaskShader); } else { final int halfAlphaColor = (color & 0xFFFFFF) | halfAlpha; p.setColor(halfAlphaColor); p.setColor(color); p.setColorFilter(null); p.setShader(null); } Loading Loading
core/res/res/values/colors_material.xml +3 −3 Original line number Diff line number Diff line Loading @@ -77,9 +77,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.54</item> <item name="highlight_alpha_material_light" format="float" type="dimen">0.12</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.26</item> <item name="highlight_alpha_material_light" format="float" type="dimen">0.16</item> <item name="highlight_alpha_material_dark" format="float" type="dimen">0.32</item> <item name="highlight_alpha_material_colored" format="float" type="dimen">0.48</item> <!-- Primary & accent colors --> <eat-comment /> Loading
graphics/java/android/graphics/drawable/RippleBackground.java +2 −7 Original line number Diff line number Diff line Loading @@ -16,17 +16,12 @@ package android.graphics.drawable; import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.TimeInterpolator; import android.graphics.Canvas; import android.graphics.CanvasProperty; import android.graphics.Paint; import android.graphics.Rect; import android.util.FloatProperty; import android.view.DisplayListCanvas; import android.view.RenderNodeAnimator; import android.view.animation.LinearInterpolator; /** Loading Loading @@ -78,8 +73,8 @@ class RippleBackground extends RippleComponent { private void onStateChanged(boolean animateChanged) { float newOpacity = 0.0f; if (mHovered) newOpacity += 1.0f; if (mFocused) newOpacity += 1.0f; if (mHovered) newOpacity += .25f; if (mFocused) newOpacity += .75f; if (mAnimator != null) { mAnimator.cancel(); mAnimator = null; Loading
graphics/java/android/graphics/drawable/RippleDrawable.java +4 −8 Original line number Diff line number Diff line Loading @@ -264,8 +264,8 @@ public class RippleDrawable extends LayerDrawable { } setRippleActive(enabled && pressed); setBackgroundActive(hovered, focused); return changed; } Loading Loading @@ -879,22 +879,18 @@ 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 = mState.mColor.getColorForState(getState(), Color.BLACK); final int halfAlpha = (Color.alpha(color) / 2) << 24; final Paint p = mRipplePaint; if (mMaskColorFilter != null) { // The ripple timing depends on the paint's alpha value, so we need // to push just the alpha channel into the paint and let the filter // handle the full-alpha color. final int fullAlphaColor = color | (0xFF << 24); mMaskColorFilter.setColor(fullAlphaColor); p.setColor(halfAlpha); mMaskColorFilter.setColor(color | 0xFF000000); p.setColor(color & 0xFF000000); p.setColorFilter(mMaskColorFilter); p.setShader(mMaskShader); } else { final int halfAlphaColor = (color & 0xFFFFFF) | halfAlpha; p.setColor(halfAlphaColor); p.setColor(color); p.setColorFilter(null); p.setShader(null); } Loading