Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d75daa47 authored by Brian Attwell's avatar Brian Attwell Committed by Android (Google) Code Review
Browse files

Merge "Fade QC contact photo more slowly" into lmp-dev

parents 692aab0c 4f4ce6a8
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -161,6 +161,12 @@ public class MultiShrinkScroller extends FrameLayout {

    private final PathInterpolator mTextSizePathInterpolator
            = new PathInterpolator(0.16f, 0.4f, 0.2f, 1);
    /**
     * Interpolator that starts and ends with nearly straight segments. At x=0 it has a y of
     * approximately 0.25. We only want the contact photo 25% faded when half collapsed.
     */
    private final PathInterpolator mWhiteBlendingPathInterpolator
            = new PathInterpolator(1.0f, 0.4f, 0.9f, 0.8f);

    private final int[] mGradientColors = new int[] {0,0xAA000000};
    private GradientDrawable mTitleGradientDrawable = new GradientDrawable(
@@ -1076,7 +1082,8 @@ public class MultiShrinkScroller extends FrameLayout {
                EXPONENT_ALMOST_ONE);
        mColorMatrix.reset();
        mColorMatrix.setSaturation(semiLinearBeforeMiddle);
        mColorMatrix.postConcat(alphaMatrix(ratio, Color.WHITE));
        mColorMatrix.postConcat(alphaMatrix(
                1 - mWhiteBlendingPathInterpolator.getInterpolation(1 - ratio), Color.WHITE));

        final float colorAlpha;
        if (mPhotoView.isBasedOffLetterTile()) {