Fix calculation of RelativeLayout width in RTL mode

Fixes: 37035671
Test: Manual
Test: bit CtsWidgetTestCases:.RelativeLayoutTest
Change-Id: I82feecdba7d1ed1198580758ab1f68932bb50aa7
This commit is contained in:
Roozbeh Pournader
2017-07-13 18:35:09 -07:00
parent 1137f872c6
commit 4d4596aae8

View File

@@ -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) {