summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-28 11:19:19 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-07-28 11:19:19 -0700
commit50f05b8ffd2c4f4d877c4564b2339ca0ccca6ec1 (patch)
treecc93e092deff1f90e17a09b13366d48d79ac853d /core
parentc6590d6f390fc69fe15a9a565327a8f8c97f107b (diff)
parentd10a576791675628a014c0488c3d054371d4d63a (diff)
downloadframeworks_base-50f05b8ffd2c4f4d877c4564b2339ca0ccca6ec1.zip
frameworks_base-50f05b8ffd2c4f4d877c4564b2339ca0ccca6ec1.tar.gz
frameworks_base-50f05b8ffd2c4f4d877c4564b2339ca0ccca6ec1.tar.bz2
Merge change 8825 into donut
* changes: Fixes 2017393. Correctly apply gravity in RelativeLayout.
Diffstat (limited to 'core')
-rw-r--r--core/java/android/widget/RelativeLayout.java14
-rw-r--r--core/res/res/drawable/expander_ic_maximized.9.pngbin1149 -> 1150 bytes
-rw-r--r--core/res/res/drawable/expander_ic_minimized.9.pngbin1172 -> 1167 bytes
3 files changed, 9 insertions, 5 deletions
diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java
index 24c0e2a..e19a93d 100644
--- a/core/java/android/widget/RelativeLayout.java
+++ b/core/java/android/widget/RelativeLayout.java
@@ -432,7 +432,7 @@ public class RelativeLayout extends ViewGroup {
width = resolveSize(width, widthMeasureSpec);
if (offsetHorizontalAxis) {
- for (int i = 0; i < count; i++) {
+ for (int i = 0; i < count; i++) {
View child = getChildAt(i);
if (child.getVisibility() != GONE) {
LayoutParams params = (LayoutParams) child.getLayoutParams();
@@ -486,10 +486,14 @@ public class RelativeLayout extends ViewGroup {
View child = getChildAt(i);
if (child.getVisibility() != GONE && child != ignore) {
LayoutParams params = (LayoutParams) child.getLayoutParams();
- params.mLeft += horizontalOffset;
- params.mRight += horizontalOffset;
- params.mTop += verticalOffset;
- params.mBottom += verticalOffset;
+ if (horizontalGravity) {
+ params.mLeft += horizontalOffset;
+ params.mRight += horizontalOffset;
+ }
+ if (verticalGravity) {
+ params.mTop += verticalOffset;
+ params.mBottom += verticalOffset;
+ }
}
}
}
diff --git a/core/res/res/drawable/expander_ic_maximized.9.png b/core/res/res/drawable/expander_ic_maximized.9.png
index 778255a..465cabd 100644
--- a/core/res/res/drawable/expander_ic_maximized.9.png
+++ b/core/res/res/drawable/expander_ic_maximized.9.png
Binary files differ
diff --git a/core/res/res/drawable/expander_ic_minimized.9.png b/core/res/res/drawable/expander_ic_minimized.9.png
index 5235c18..9967ecb 100644
--- a/core/res/res/drawable/expander_ic_minimized.9.png
+++ b/core/res/res/drawable/expander_ic_minimized.9.png
Binary files differ