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

Commit 0446ac0b authored by Joey's avatar Joey Committed by Michael Bestas
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 ee42f42f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
    android:id="@id/global_actions_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="top|right"
    android:layout_gravity="@integer/hardware_ui_align"
    android:layout_marginBottom="0dp"
    android:orientation="vertical"
    android:paddingTop="@dimen/global_actions_top_padding"
@@ -17,7 +17,7 @@
        android:id="@android:id/list"
        android:layout_width="wrap_content"
        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="@dimen/global_actions_padding"
+24 −0
Original line number Diff line number Diff line
<!--
     Copyright (C) 2018 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<resources>
    <!-- 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
@@ -124,6 +124,7 @@ public class HardwareUiLayout extends MultiListLayout implements Tunable {
                params.bottomMargin = edge;
            } else {
                params.rightMargin = edge;
                params.leftMargin = edge;
            }
            mList.setLayoutParams(params);
        }