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

Commit 4f4ce6a8 authored by Brian Attwell's avatar Brian Attwell
Browse files

Fade QC contact photo more slowly

What the spline looks like: http://jsfiddle.net/rc3rfrgc/

Bug: 17380032
Change-Id: I2edc76b068a3d848a535a6b54e82a2c8e91939dc
parent 5c748642
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(
@@ -1075,7 +1081,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()) {