diff options
| author | 2023-05-16 15:09:31 -0400 | |
|---|---|---|
| committer | 2023-06-03 00:06:02 -0700 | |
| commit | c930b2bad2152dd8815a4b5114ddbd352c0200c0 (patch) | |
| tree | 1e127b8a205f8c0820949e145572accaf2fdcfab /src/android | |
| parent | android: Button to reset all settings (diff) | |
| download | yuzu-c930b2bad2152dd8815a4b5114ddbd352c0200c0.tar.gz yuzu-c930b2bad2152dd8815a4b5114ddbd352c0200c0.tar.xz yuzu-c930b2bad2152dd8815a4b5114ddbd352c0200c0.zip | |
android: Use cutout insets on setup fragment
Diffstat (limited to 'src/android')
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt index 13b8315db..153622072 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SetupFragment.kt | |||
| @@ -278,12 +278,13 @@ class SetupFragment : Fragment() { | |||
| 278 | 278 | ||
| 279 | private fun setInsets() = | 279 | private fun setInsets() = |
| 280 | ViewCompat.setOnApplyWindowInsetsListener(binding.root) { view: View, windowInsets: WindowInsetsCompat -> | 280 | ViewCompat.setOnApplyWindowInsetsListener(binding.root) { view: View, windowInsets: WindowInsetsCompat -> |
| 281 | val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) | 281 | val barInsets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) |
| 282 | val cutoutInsets = windowInsets.getInsets(WindowInsetsCompat.Type.displayCutout()) | ||
| 282 | view.setPadding( | 283 | view.setPadding( |
| 283 | insets.left, | 284 | barInsets.left + cutoutInsets.left, |
| 284 | insets.top, | 285 | barInsets.top + cutoutInsets.top, |
| 285 | insets.right, | 286 | barInsets.right + cutoutInsets.right, |
| 286 | insets.bottom | 287 | barInsets.bottom + cutoutInsets.bottom |
| 287 | ) | 288 | ) |
| 288 | windowInsets | 289 | windowInsets |
| 289 | } | 290 | } |