diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2012-10-26 16:27:55 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2012-10-26 17:13:33 -0700 |
commit | bb4b601673a4f910d3e467bc5ce39538438859ce (patch) | |
tree | 486cb529b62e7515e340dcb364ef4edcf7f315f8 /core/java/android/widget/RelativeLayout.java | |
parent | f704e9f67745d1f1c01058f4c74b06d157b4054d (diff) | |
download | frameworks_base-bb4b601673a4f910d3e467bc5ce39538438859ce.zip frameworks_base-bb4b601673a4f910d3e467bc5ce39538438859ce.tar.gz frameworks_base-bb4b601673a4f910d3e467bc5ce39538438859ce.tar.bz2 |
Revert "Fix bug #7325234 LayoutParams are not resolved correctly (Settings apps looks broken on Manta in Arabic)"
This reverts commit 6bf6eb7d5f9207d6a3e1d6b61f17a8654d06fbdb.
and also fbc21e126f329b7b7c161858c1390ccb023be07e
I have also removed all unnecessary calls to resolveLayoutDirection(int). This is possible as
we are resolving layout params on every child of a ViewGroup as of commit
fcc3348f61b2992f0b84e8e8dcb3535fc715298f
Change-Id: I262a375b03fcc3c9261cbe2edebb6ec42ec2e186
Diffstat (limited to 'core/java/android/widget/RelativeLayout.java')
-rw-r--r-- | core/java/android/widget/RelativeLayout.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java index ace26f3..e52e84d 100644 --- a/core/java/android/widget/RelativeLayout.java +++ b/core/java/android/widget/RelativeLayout.java @@ -414,15 +414,12 @@ public class RelativeLayout extends ViewGroup { final boolean isWrapContentWidth = widthMode != MeasureSpec.EXACTLY; final boolean isWrapContentHeight = heightMode != MeasureSpec.EXACTLY; - final int layoutDirection = getLayoutDirection(); - View[] views = mSortedHorizontalChildren; int count = views.length; for (int i = 0; i < count; i++) { View child = views[i]; if (child.getVisibility() != GONE) { LayoutParams params = (LayoutParams) child.getLayoutParams(); - params.resolveLayoutDirection(layoutDirection); applyHorizontalSizeRules(params, myWidth); measureChildHorizontal(child, params, myWidth, myHeight); @@ -486,6 +483,8 @@ public class RelativeLayout extends ViewGroup { } } + final int layoutDirection = getLayoutDirection(); + if (isWrapContentWidth) { // Width already has left padding in it since it was calculated by looking at // the right of each child view @@ -730,7 +729,6 @@ public class RelativeLayout extends ViewGroup { final int layoutDirection = getLayoutDirection(); int[] rules = params.getRules(layoutDirection); - params.resolveLayoutDirection(layoutDirection); if (params.mLeft < 0 && params.mRight >= 0) { // Right is fixed, but left varies @@ -984,7 +982,6 @@ public class RelativeLayout extends ViewGroup { if (child.getVisibility() != GONE) { RelativeLayout.LayoutParams st = (RelativeLayout.LayoutParams) child.getLayoutParams(); - st.resolveLayoutDirection(getLayoutDirection()); child.layout(st.mLeft, st.mTop, st.mRight, st.mBottom); } } |