Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13e287ab authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix UI location and snackbar padding for RTL." into udc-dev

parents 969940a6 97299f2b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingStart="16dp"
      android:paddingEnd="16dp"
      android:gravity="center_vertical"
      android:textColor="@color/colorControlNormal"
      android:textSize="@dimen/label_text_size"
+7 −5
Original line number Diff line number Diff line
@@ -194,13 +194,15 @@ public class A11yMenuOverlayLayout {
    /** Updates a11y menu layout position by configuring layout params. */
    private void updateLayoutPosition() {
        final Display display = mDisplayManager.getDisplay(Display.DEFAULT_DISPLAY);
        final int orientation = mService.getResources().getConfiguration().orientation;
        final Configuration configuration = mService.getResources().getConfiguration();
        final int orientation = configuration.orientation;
        if (display != null && orientation == Configuration.ORIENTATION_LANDSCAPE) {
            final boolean ltr = configuration.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR;
            switch (display.getRotation()) {
                case Surface.ROTATION_90:
                case Surface.ROTATION_0:
                case Surface.ROTATION_180:
                    mLayoutParameter.gravity =
                            Gravity.END | Gravity.BOTTOM
                            (ltr ? Gravity.END : Gravity.START) | Gravity.BOTTOM
                                    | Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL;
                    mLayoutParameter.width = WindowManager.LayoutParams.WRAP_CONTENT;
                    mLayoutParameter.height = WindowManager.LayoutParams.MATCH_PARENT;
@@ -208,10 +210,10 @@ public class A11yMenuOverlayLayout {
                    mLayoutParameter.flags |= WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR;
                    mLayout.setBackgroundResource(R.drawable.shadow_90deg);
                    break;
                case Surface.ROTATION_0:
                case Surface.ROTATION_90:
                case Surface.ROTATION_270:
                    mLayoutParameter.gravity =
                            Gravity.START | Gravity.BOTTOM
                            (ltr ? Gravity.START : Gravity.END) | Gravity.BOTTOM
                                    | Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL;
                    mLayoutParameter.width = WindowManager.LayoutParams.WRAP_CONTENT;
                    mLayoutParameter.height = WindowManager.LayoutParams.MATCH_PARENT;