From c60982b2487eea9bc890393489cca1e1ec34500f Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Sun, 4 Dec 2022 12:34:36 -0500 Subject: [PATCH] Android: Fix cheats layout The sliding panel layout was in the way of the top app bar and prevented the up button from being pressed. This anchors the panel to the bottom of the top app bar and removed unnecessary hardcoded padding. --- .../dolphinemu/utils/InsetsHelper.java | 2 +- .../src/main/res/layout/activity_cheats.xml | 57 ++++++++++++------- 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/InsetsHelper.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/InsetsHelper.java index 7b98528667..7f9149bb2b 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/InsetsHelper.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/InsetsHelper.java @@ -130,7 +130,7 @@ public class InsetsHelper insetAppBar(barInsets, appBarLayout); - slidingPaneLayout.setPadding(barInsets.left, barInsets.top, barInsets.right, 0); + slidingPaneLayout.setPadding(barInsets.left, 0, barInsets.right, 0); // Set keyboard insets if the system supports smooth keyboard animations ViewGroup.MarginLayoutParams mlpDetails = diff --git a/Source/Android/app/src/main/res/layout/activity_cheats.xml b/Source/Android/app/src/main/res/layout/activity_cheats.xml index 151c8edf67..f39f2d55e5 100644 --- a/Source/Android/app/src/main/res/layout/activity_cheats.xml +++ b/Source/Android/app/src/main/res/layout/activity_cheats.xml @@ -1,44 +1,56 @@ - + android:layout_height="match_parent"> - + android:background="?attr/colorSurface" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> - + app:elevation="0dp" + app:liftOnScroll="false"> - + + + + + + android:layout_height="0dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/coordinator_main"> + android:layout_height="match_parent" /> + android:layout_height="match_parent" /> @@ -47,7 +59,10 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_gravity="bottom" + android:background="@android:color/transparent" android:clickable="true" - android:background="@android:color/transparent" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> - +