[Android] FlingViewGroup: set correctly the measured view group height
Adrien Maglo
git at videolan.org
Fri Jan 24 15:37:32 CET 2014
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Jan 24 15:36:14 2014 +0100| [333408239d5446d6091f29bd2200716eed08c58c] | committer: Adrien Maglo
FlingViewGroup: set correctly the measured view group height
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=333408239d5446d6091f29bd2200716eed08c58c
---
vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java b/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java
index d6ff4df..756994b 100644
--- a/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java
+++ b/vlc-android/src/org/videolan/vlc/widget/FlingViewGroup.java
@@ -86,9 +86,14 @@ public class FlingViewGroup extends ViewGroup {
}
final int count = getChildCount();
+ int maxHeight = 0;
for (int i = 0; i < count; i++) {
- getChildAt(i).measure(widthMeasureSpec, heightMeasureSpec);
+ View child = getChildAt(i);
+ child.measure(widthMeasureSpec, heightMeasureSpec);
+ maxHeight = Math.max(maxHeight, child.getMeasuredHeight());
}
+
+ setMeasuredDimension(getMeasuredWidth(), maxHeight);
}
@Override
More information about the Android
mailing list