diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-28 11:19:19 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-28 11:19:19 -0700 |
commit | 50f05b8ffd2c4f4d877c4564b2339ca0ccca6ec1 (patch) | |
tree | cc93e092deff1f90e17a09b13366d48d79ac853d /core | |
parent | c6590d6f390fc69fe15a9a565327a8f8c97f107b (diff) | |
parent | d10a576791675628a014c0488c3d054371d4d63a (diff) | |
download | frameworks_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.java | 14 | ||||
-rw-r--r-- | core/res/res/drawable/expander_ic_maximized.9.png | bin | 1149 -> 1150 bytes | |||
-rw-r--r-- | core/res/res/drawable/expander_ic_minimized.9.png | bin | 1172 -> 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 Binary files differindex 778255a..465cabd 100644 --- a/core/res/res/drawable/expander_ic_maximized.9.png +++ b/core/res/res/drawable/expander_ic_maximized.9.png diff --git a/core/res/res/drawable/expander_ic_minimized.9.png b/core/res/res/drawable/expander_ic_minimized.9.png Binary files differindex 5235c18..9967ecb 100644 --- a/core/res/res/drawable/expander_ic_minimized.9.png +++ b/core/res/res/drawable/expander_ic_minimized.9.png |