[Android] Audio player: reinitialize the animation of the cover view when the orientation changes
Adrien Maglo
git at videolan.org
Fri Dec 6 10:43:10 CET 2013
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Dec 6 10:29:41 2013 +0100| [9cd655dd35d416b4c3a72a614ed83fd7179dac19] | committer: Adrien Maglo
Audio player: reinitialize the animation of the cover view when the orientation changes
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=9cd655dd35d416b4c3a72a614ed83fd7179dac19
---
vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java b/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
index 8bbc849..ae4a265 100644
--- a/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
+++ b/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
@@ -53,6 +53,14 @@ public class AnimatedCoverView extends View {
}
@Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ super.onSizeChanged(w, h, oldw, oldh);
+
+ // Reinitialize the current animation.
+ mCurrentAnim = null;
+ }
+
+ @Override
protected void onDraw(Canvas canvas) {
if (mImage != null) {
// Determine the animation parameters.
More information about the Android
mailing list