[Android] Adapt the FlingView assert to fragment

Jean-Baptiste Kempf git at videolan.org
Thu Jun 21 18:19:18 CEST 2012


android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jun 21 18:18:48 2012 +0200| [882432dacb2661325066f93a2dff4e5e106871f3] | committer: Jean-Baptiste Kempf

Adapt the FlingView assert to fragment

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=882432dacb2661325066f93a2dff4e5e106871f3
---

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

diff --git a/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java b/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java
index 6152500..d24eb29 100644
--- a/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java
+++ b/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java
@@ -80,17 +80,12 @@ public class FlingViewGroup extends ViewGroup {
         super.onMeasure(widthMeasureSpec, heightMeasureSpec);
 
         final int width = MeasureSpec.getSize(widthMeasureSpec);
+
         final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
-        final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
 
-        //FIXME I had to comment this block after switching to Fragments
-        // I don't know if it was useful or not, but apparently it still works without.
-        /*
-        if (widthMode != MeasureSpec.EXACTLY ||
-                heightMode != MeasureSpec.EXACTLY) {
+        if (widthMode != MeasureSpec.EXACTLY ) {
             throw new IllegalStateException("can only be used in EXACTLY mode.");
         }
-        */
 
         final int count = getChildCount();
         for (int i = 0; i < count; i++) {



More information about the Android mailing list