Fixed button bar alignment issue in RTL languages

Buttons should be aligned opposite to English in RTL languages.

Test: 1. RTL language
      2. Create an alert dialog having positive, negative and neutral button.
      3. Check the button bar alignment
Bug: 70363698

Change-Id: I783dfdcf9cb3f85402a4ff3fa4c2d1d1caf5c3da
Signed-off-by: susanta.patra <susanta.patra@lge.com>
This commit is contained in:
susanta.patra
2017-12-08 11:55:40 +05:30
parent b501e7e25b
commit 1b0b22ce08

View File

@@ -151,7 +151,7 @@ public class ButtonBarLayout extends LinearLayout {
private void setStacked(boolean stacked) {
setOrientation(stacked ? LinearLayout.VERTICAL : LinearLayout.HORIZONTAL);
setGravity(stacked ? Gravity.RIGHT : Gravity.BOTTOM);
setGravity(stacked ? Gravity.END : Gravity.BOTTOM);
final View spacer = findViewById(R.id.spacer);
if (spacer != null) {