summaryrefslogtreecommitdiff
path: root/core/java/android/widget/RelativeLayout.java
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2017-07-13 18:35:09 -0700
committerRoozbeh Pournader <roozbeh@google.com>2017-07-13 19:11:05 -0700
commit4d4596aae8fb381f55b7f6f0fbcd82839b6262b5 (patch)
treec05299f065db356af61d49885ef189c716794a39 /core/java/android/widget/RelativeLayout.java
parent1137f872c6e4ee0b2f630cd03f5b4f0033368115 (diff)
Fix calculation of RelativeLayout width in RTL mode
Fixes: 37035671 Test: Manual Test: bit CtsWidgetTestCases:.RelativeLayoutTest Change-Id: I82feecdba7d1ed1198580758ab1f68932bb50aa7
Diffstat (limited to 'core/java/android/widget/RelativeLayout.java')
-rw-r--r--core/java/android/widget/RelativeLayout.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java
index 33e65214996b..75fc53864101 100644
--- a/core/java/android/widget/RelativeLayout.java
+++ b/core/java/android/widget/RelativeLayout.java
@@ -486,7 +486,7 @@ public class RelativeLayout extends ViewGroup {
if (targetSdkVersion < Build.VERSION_CODES.KITKAT) {
width = Math.max(width, myWidth - params.mLeft);
} else {
- width = Math.max(width, myWidth - params.mLeft - params.leftMargin);
+ width = Math.max(width, myWidth - params.mLeft + params.leftMargin);
}
} else {
if (targetSdkVersion < Build.VERSION_CODES.KITKAT) {