From baac46339da03aed166e8a4240ad063caad019ad Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 29 Jun 2009 14:28:29 -0700 Subject: Fixes #1940605. MeasureSpec's mode and height were inverted in RelativeLayout. Also bumps up the cache's number of Nodes. --- core/java/android/widget/RelativeLayout.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/java/android/widget/RelativeLayout.java') diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java index 12bb01c18b52..e62dda58ba42 100644 --- a/core/java/android/widget/RelativeLayout.java +++ b/core/java/android/widget/RelativeLayout.java @@ -558,9 +558,9 @@ public class RelativeLayout extends ViewGroup { myWidth); int childHeightMeasureSpec; if (params.width == LayoutParams.FILL_PARENT) { - childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(MeasureSpec.EXACTLY, myHeight); + childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(myHeight, MeasureSpec.EXACTLY); } else { - childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); + childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(myHeight, MeasureSpec.AT_MOST); } child.measure(childWidthMeasureSpec, childHeightMeasureSpec); } @@ -1403,7 +1403,9 @@ public class RelativeLayout extends ViewGroup { /* * START POOL IMPLEMENTATION */ - private static final int POOL_LIMIT = 12; + // The pool is static, so all nodes instances are shared across + // activities, that's why we give it a rather high limit + private static final int POOL_LIMIT = 100; private static final Pool sPool = Pools.synchronizedPool( Pools.finitePool(new PoolableManager() { public Node newInstance() { -- cgit v1.2.3