[Android] Animated cover view: slow down the animation and use a constant speed

Adrien Maglo git at videolan.org
Fri Feb 7 11:43:43 CET 2014


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Feb  7 11:43:37 2014 +0100| [b39f8f7acd211e1c01422cdfac325907e6770d40] | committer: Adrien Maglo

Animated cover view: slow down the animation and use a constant speed

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b39f8f7acd211e1c01422cdfac325907e6770d40
---

 vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java b/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
index 2f0f225..e97b100 100644
--- a/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
+++ b/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
@@ -26,8 +26,8 @@ import android.graphics.Paint;
 import android.graphics.Rect;
 import android.util.AttributeSet;
 import android.view.View;
-import android.view.animation.AccelerateDecelerateInterpolator;
 import android.view.animation.AnimationUtils;
+import android.view.animation.LinearInterpolator;
 import android.view.animation.Transformation;
 import android.view.animation.TranslateAnimation;
 
@@ -95,9 +95,9 @@ public class AnimatedCoverView extends View {
                         mCurrentMove == ANIMATION_MOVE_1 ? rect.bottom - scaledImageHeight : 0);
 
                 int animationDuration = scaledImageHeight == rect.bottom ?
-                        (scaledImageWidth - rect.right) * 15 : (scaledImageHeight - rect.bottom) * 15;
+                        (scaledImageWidth - rect.right) * 60 : (scaledImageHeight - rect.bottom) * 60;
                 mCurrentAnim.setDuration(animationDuration);
-                mCurrentAnim.setInterpolator(new AccelerateDecelerateInterpolator());
+                mCurrentAnim.setInterpolator(new LinearInterpolator());
                 mCurrentAnim.initialize(mImage.getWidth(), mImage.getHeight(), rect.right, rect.bottom);
             }
 



More information about the Android mailing list