From d32cc1e5eb6402dff1229626855482076d9aa0da Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Fri, 6 Jan 2023 16:00:56 -0500 Subject: [PATCH] Android: Fix workaround view in cheats activity When using a fullscreen mode on some phones that remove the navigation bar, inset callbacks will not be fired. To account for this we set the workaround view at a height of 1px to prevent the view from filling the entire screen due to this activity using a Constraint layout. --- .../org/dolphinemu/dolphinemu/utils/InsetsHelper.java | 9 +++------ .../Android/app/src/main/res/layout/activity_cheats.xml | 6 +++++- 2 files changed, 8 insertions(+), 7 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 b4670341a9..cfbb859676 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 @@ -31,12 +31,9 @@ public class InsetsHelper // navigation bar https://issuetracker.google.com/issues/248761842 public static void applyNavbarWorkaround(int bottomInset, View workaroundView) { - if (bottomInset > 0) - { - ViewGroup.LayoutParams lpWorkaround = workaroundView.getLayoutParams(); - lpWorkaround.height = bottomInset; - workaroundView.setLayoutParams(lpWorkaround); - } + ViewGroup.LayoutParams lpWorkaround = workaroundView.getLayoutParams(); + lpWorkaround.height = bottomInset; + workaroundView.setLayoutParams(lpWorkaround); } public static int getSystemGestureType(Context context) 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 030e8f3581..f8be839551 100644 --- a/Source/Android/app/src/main/res/layout/activity_cheats.xml +++ b/Source/Android/app/src/main/res/layout/activity_cheats.xml @@ -58,10 +58,14 @@ +