summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/res/layout/controls_base_item.xml3
-rw-r--r--packages/SystemUI/res/layout/controls_more_item.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsPopupMenu.java7
3 files changed, 11 insertions, 2 deletions
diff --git a/packages/SystemUI/res/layout/controls_base_item.xml b/packages/SystemUI/res/layout/controls_base_item.xml
index 477a70f4c7ad..5f83f45958e9 100644
--- a/packages/SystemUI/res/layout/controls_base_item.xml
+++ b/packages/SystemUI/res/layout/controls_base_item.xml
@@ -52,6 +52,7 @@
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit = "marquee_forever"
+ android:textDirection="locale"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/icon"
app:layout_constraintStart_toEndOf="@+id/icon" />
@@ -67,6 +68,7 @@
android:focusable="false"
android:maxLines="1"
android:ellipsize="end"
+ android:textDirection="locale"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/barrier"/>
@@ -90,6 +92,7 @@
android:focusable="false"
android:maxLines="1"
android:ellipsize="end"
+ android:textDirection="locale"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/favorite"
app:layout_constraintTop_toTopOf="@id/favorite"
diff --git a/packages/SystemUI/res/layout/controls_more_item.xml b/packages/SystemUI/res/layout/controls_more_item.xml
index df03787d567c..da9c43ccc1e9 100644
--- a/packages/SystemUI/res/layout/controls_more_item.xml
+++ b/packages/SystemUI/res/layout/controls_more_item.xml
@@ -20,5 +20,6 @@
android:layout_height="wrap_content"
android:layout_gravity="start"
android:paddingStart="@dimen/control_menu_horizontal_padding"
- android:paddingEnd="@dimen/control_menu_horizontal_padding"/>
+ android:paddingEnd="@dimen/control_menu_horizontal_padding"
+ android:textDirection="locale"/>
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsPopupMenu.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsPopupMenu.java
index 6b71f1e9d86f..1dbbb4d69493 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsPopupMenu.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsPopupMenu.java
@@ -19,6 +19,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.Context;
import android.content.res.Resources;
+import android.util.LayoutDirection;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.WindowManager;
@@ -106,7 +107,11 @@ public class GlobalActionsPopupMenu extends ListPopupWindow {
listView.setPadding(0, mMenuVerticalPadding, 0, mMenuVerticalPadding);
setWidth(width);
- setHorizontalOffset(getAnchorView().getWidth() - mGlobalActionsSidePadding - width);
+ if (getAnchorView().getLayoutDirection() == LayoutDirection.LTR) {
+ setHorizontalOffset(getAnchorView().getWidth() - mGlobalActionsSidePadding - width);
+ } else {
+ setHorizontalOffset(mGlobalActionsSidePadding);
+ }
}
super.show();