Merge pull request #11428 from t895/cheats-fix-2

Android: Ignore workaround view height if 0
This commit is contained in:
JosJuice 2023-01-10 18:57:14 +01:00 committed by GitHub
commit 4b6d6883f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -31,9 +31,12 @@ public class InsetsHelper
// navigation bar https://issuetracker.google.com/issues/248761842
public static void applyNavbarWorkaround(int bottomInset, View workaroundView)
{
ViewGroup.LayoutParams lpWorkaround = workaroundView.getLayoutParams();
lpWorkaround.height = bottomInset;
workaroundView.setLayoutParams(lpWorkaround);
if (bottomInset > 0)
{
ViewGroup.LayoutParams lpWorkaround = workaroundView.getLayoutParams();
lpWorkaround.height = bottomInset;
workaroundView.setLayoutParams(lpWorkaround);
}
}
public static int getSystemGestureType(Context context)