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

Commit 6c4a4059 authored by Joey's avatar Joey Committed by Bruno Martins
Browse files

SystemUI: allow the power menu to be relocated



For devices with power buttons that are not on the right side of the device

Change-Id: Ibb6dbada536e02a02709492c1e37ff7aa5ee3067
Signed-off-by: default avatarJoey <joey@lineageos.org>
parent b40e7ebc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
        android:id="@android:id/list"
        android:layout_width="@dimen/global_actions_panel_width"
        android:layout_height="wrap_content"
        android:layout_gravity="top|right"
        android:layout_gravity="@integer/hardware_ui_align"
        android:gravity="center"
        android:orientation="vertical"
        android:padding="12dp"
+8 −0
Original line number Diff line number Diff line
@@ -23,4 +23,12 @@
    <!-- Max visible notification icons -->
    <integer name="config_maxVisibleNotificationIcons">4</integer>
    <integer name="config_maxVisibleNotificationIconsWhenDark">5</integer>

    <!-- Hardware ui (power menu) alignement:
         Use one of the following values basing on the power button position:
         * Top | Back -> 49 (Gravity.TOP | Gravity.CENTER_HORIZONTAL)
         * Left -> 51 (Gravity.TOP | Gravity.LEFT)
         * Right -> 53 (Gravity.TOP | Gravity.RIGHT)
    -->
    <integer name="hardware_ui_align">53</integer>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@ public class HardwareUiLayout extends FrameLayout implements Tunable {
                params.bottomMargin = edge;
            } else {
                params.rightMargin = edge;
                params.leftMargin = edge;
            }
            mChild.setLayoutParams(params);
        }