summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-29 14:29:23 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-06-29 14:29:23 -0700
commit3a608f829b54a7653c9cc2b3bdbda0641cca37bb (patch)
tree53c51466f6842c3d2dc6efd17a439a57b3e0e64f
parent52bce9c4e7b66ee0a8e1bc5ea7798cf5892b4f23 (diff)
parentbaac46339da03aed166e8a4240ad063caad019ad (diff)
downloadframeworks_base-3a608f829b54a7653c9cc2b3bdbda0641cca37bb.zip
frameworks_base-3a608f829b54a7653c9cc2b3bdbda0641cca37bb.tar.gz
frameworks_base-3a608f829b54a7653c9cc2b3bdbda0641cca37bb.tar.bz2
Merge change 5684 into donut
* changes: Fixes #1940605. MeasureSpec's mode and height were inverted in RelativeLayout.
-rw-r--r--core/java/android/widget/RelativeLayout.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java
index 12bb01c..e62dda5 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<Node> sPool = Pools.synchronizedPool(
Pools.finitePool(new PoolableManager<Node>() {
public Node newInstance() {