diff options
author | Brian Attwell <brianattwell@google.com> | 2014-09-04 18:26:00 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-04 18:26:01 +0000 |
commit | d75daa47c5c1eb1e63802d3b1b6a8a7c3a876da9 (patch) | |
tree | 8a5a3b755fb725b32f029a0b8c45c0582447ce35 /src/com/android/contacts/widget | |
parent | 692aab0cf63fcbf1f178f153d7863784d2475eca (diff) | |
parent | 4f4ce6a88af40381ade60824081c9a8571e54afb (diff) | |
download | Contacts-d75daa47c5c1eb1e63802d3b1b6a8a7c3a876da9.tar.gz |
Merge "Fade QC contact photo more slowly" into lmp-dev
Diffstat (limited to 'src/com/android/contacts/widget')
-rw-r--r-- | src/com/android/contacts/widget/MultiShrinkScroller.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/contacts/widget/MultiShrinkScroller.java b/src/com/android/contacts/widget/MultiShrinkScroller.java index e277f74b1..c5492d22a 100644 --- a/src/com/android/contacts/widget/MultiShrinkScroller.java +++ b/src/com/android/contacts/widget/MultiShrinkScroller.java @@ -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()) { |