summaryrefslogtreecommitdiffstats
path: root/src/android/app
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2023-09-26 02:57:33 +0200
committerGitHub <noreply@github.com>2023-09-26 02:57:33 +0200
commit4e855be38b720068a4d95cc53f3128d09f80c15e (patch)
tree6c48637e634dab2ff1d862c36afc158933ffedd8 /src/android/app
parentMerge pull request #11597 from t895/drawer-fix (diff)
parentandroid: Prevent nav bar shade from laying out across screen (diff)
downloadyuzu-4e855be38b720068a4d95cc53f3128d09f80c15e.tar
yuzu-4e855be38b720068a4d95cc53f3128d09f80c15e.tar.gz
yuzu-4e855be38b720068a4d95cc53f3128d09f80c15e.tar.bz2
yuzu-4e855be38b720068a4d95cc53f3128d09f80c15e.tar.lz
yuzu-4e855be38b720068a4d95cc53f3128d09f80c15e.tar.xz
yuzu-4e855be38b720068a4d95cc53f3128d09f80c15e.tar.zst
yuzu-4e855be38b720068a4d95cc53f3128d09f80c15e.zip
Diffstat (limited to 'src/android/app')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt10
-rw-r--r--src/android/app/src/main/res/layout/activity_settings.xml2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt
index 4d2f2f604..ea26a21d0 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt
@@ -181,12 +181,14 @@ class SettingsActivity : AppCompatActivity() {
private fun setInsets() {
ViewCompat.setOnApplyWindowInsetsListener(
binding.navigationBarShade
- ) { view: View, windowInsets: WindowInsetsCompat ->
+ ) { _: View, windowInsets: WindowInsetsCompat ->
val barInsets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
- val mlpShade = view.layoutParams as MarginLayoutParams
- mlpShade.height = barInsets.bottom
- view.layoutParams = mlpShade
+ // The only situation where we care to have a nav bar shade is when it's at the bottom
+ // of the screen where scrolling list elements can go behind it.
+ val mlpNavShade = binding.navigationBarShade.layoutParams as MarginLayoutParams
+ mlpNavShade.height = barInsets.bottom
+ binding.navigationBarShade.layoutParams = mlpNavShade
windowInsets
}
diff --git a/src/android/app/src/main/res/layout/activity_settings.xml b/src/android/app/src/main/res/layout/activity_settings.xml
index 8a026a30a..a187665f2 100644
--- a/src/android/app/src/main/res/layout/activity_settings.xml
+++ b/src/android/app/src/main/res/layout/activity_settings.xml
@@ -22,7 +22,7 @@
<View
android:id="@+id/navigation_bar_shade"
- android:layout_width="match_parent"
+ android:layout_width="0dp"
android:layout_height="1px"
android:background="@android:color/transparent"
android:clickable="false"