[Android] Do not use negative durations in animations
Jean-Baptiste Kempf
git at videolan.org
Sun Apr 6 18:13:32 CEST 2014
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 6 18:13:13 2014 +0200| [7e2bc7a7ee8245ebdc0b57b2fad7fec976f58592] | committer: Jean-Baptiste Kempf
Do not use negative durations in animations
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=7e2bc7a7ee8245ebdc0b57b2fad7fec976f58592
---
vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java b/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
index e97b100..2b28bc4 100644
--- a/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
+++ b/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
@@ -96,6 +96,8 @@ public class AnimatedCoverView extends View {
int animationDuration = scaledImageHeight == rect.bottom ?
(scaledImageWidth - rect.right) * 60 : (scaledImageHeight - rect.bottom) * 60;
+ if (animationDuration <= 10)
+ animationDuration = 10;
mCurrentAnim.setDuration(animationDuration);
mCurrentAnim.setInterpolator(new LinearInterpolator());
mCurrentAnim.initialize(mImage.getWidth(), mImage.getHeight(), rect.right, rect.bottom);
@@ -123,4 +125,4 @@ public class AnimatedCoverView extends View {
mImage = b;
invalidate();
}
-}
\ No newline at end of file
+}
More information about the Android
mailing list