Allow content to be drawn behind the navigation bars

This commit is contained in:
lynxnb 2022-01-25 20:10:31 +01:00
parent be38c8b7a2
commit 8d56fa3194
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -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)