[Android] FlingViewGroup: cancel scrolling animation on size changed

Adrien Maglo git at videolan.org
Tue Jan 14 19:51:56 CET 2014


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Tue Jan 14 19:51:50 2014 +0100| [978a4bb1552a266ffa952bbf1cdcbfcf164ee624] | committer: Adrien Maglo

FlingViewGroup: cancel scrolling animation on size changed

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

 vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java b/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java
index b102daa..d6ff4df 100644
--- a/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java
+++ b/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java
@@ -93,6 +93,8 @@ public class FlingViewGroup extends ViewGroup {
 
     @Override
     protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+        if (!mScroller.isFinished())
+            mScroller.abortAnimation();
         super.onSizeChanged(w, h, oldw, oldh);
         scrollTo(mCurrentView * w, 0);
         requestLayout();



More information about the Android mailing list