diff options
author | Yorke Lee <yorkelee@google.com> | 2013-07-31 22:05:20 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-07-31 22:05:20 +0000 |
commit | 0fb95f01f5b17ac3e19f2b336c1d8e69e513edc0 (patch) | |
tree | 22d2931c945c841cef6de3e7a7c8a283db0085e8 /src | |
parent | c3766338b312f9c8a6bdb2facaf4b0a4bd199de4 (diff) | |
parent | 11a9968c65835512ae9b79b9c029042b9a304ebf (diff) |
Merge "Prevent animation length from going negative"
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoriteTileView.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoriteTileView.java b/src/com/android/dialer/list/PhoneFavoriteTileView.java index 9a1577a27..4efc4dbb9 100644 --- a/src/com/android/dialer/list/PhoneFavoriteTileView.java +++ b/src/com/android/dialer/list/PhoneFavoriteTileView.java @@ -135,6 +135,7 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { // favorite removal view to the foreground to ask user to confirm removal. int animationLength = (int) ((1 - Math.abs(mFavoriteContactCard.getTranslationX()) / getWidth()) * ANIMATION_LENGTH); + animationLength = Math.max(0, animationLength); final ObjectAnimator fadeOut = ObjectAnimator.ofFloat(mFavoriteContactCard, "alpha", 0.f).setDuration(animationLength); final ObjectAnimator moveAway = ObjectAnimator.ofFloat(mFavoriteContactCard, |