From 8d56fa31941b31cab59041d90cb0ba16930efb79 Mon Sep 17 00:00:00 2001 From: lynxnb Date: Tue, 25 Jan 2022 20:10:31 +0100 Subject: [PATCH] Allow content to be drawn behind the navigation bars --- app/src/main/java/emu/skyline/MainActivity.kt | 2 ++ app/src/main/java/emu/skyline/SettingsActivity.kt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/emu/skyline/MainActivity.kt b/app/src/main/java/emu/skyline/MainActivity.kt index 7c2ba97b..e8ab45e2 100644 --- a/app/src/main/java/emu/skyline/MainActivity.kt +++ b/app/src/main/java/emu/skyline/MainActivity.kt @@ -19,6 +19,7 @@ import androidx.core.content.ContextCompat import androidx.core.content.FileProvider import androidx.core.content.res.use import androidx.core.graphics.drawable.toBitmap +import androidx.core.view.WindowCompat import androidx.core.view.isInvisible import androidx.core.view.isVisible import androidx.core.view.size @@ -101,6 +102,7 @@ class MainActivity : AppCompatActivity() { super.onCreate(savedInstanceState) setContentView(binding.root) + WindowCompat.setDecorFitsSystemWindows(window, false) PreferenceManager.setDefaultValues(this, R.xml.preferences, false) diff --git a/app/src/main/java/emu/skyline/SettingsActivity.kt b/app/src/main/java/emu/skyline/SettingsActivity.kt index 060cdf8b..0726db66 100644 --- a/app/src/main/java/emu/skyline/SettingsActivity.kt +++ b/app/src/main/java/emu/skyline/SettingsActivity.kt @@ -9,6 +9,7 @@ import android.os.Bundle import android.view.KeyEvent import android.view.View import androidx.appcompat.app.AppCompatActivity +import androidx.core.view.WindowCompat import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat import emu.skyline.databinding.SettingsActivityBinding @@ -29,6 +30,7 @@ class SettingsActivity : AppCompatActivity() { super.onCreate(savedInstanceState) setContentView(binding.root) + WindowCompat.setDecorFitsSystemWindows(window, false) setSupportActionBar(binding.titlebar.toolbar) supportActionBar?.setDisplayHomeAsUpEnabled(true)