mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 17:45:28 +03:00
Correctly hide system bars in EmulationActivity
on Android >= 11
This commit is contained in:
parent
3ff8075151
commit
58c871ed9a
@ -229,8 +229,10 @@ class EmulationActivity : AppCompatActivity(), SurfaceHolder.Callback, View.OnTo
|
|||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||||
window.insetsController?.hide(WindowInsets.Type.navigationBars() or WindowInsets.Type.systemBars() or WindowInsets.Type.systemGestures() or WindowInsets.Type.statusBars())
|
window.insetsController?.let {
|
||||||
window.insetsController?.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
it.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
||||||
|
it.hide(WindowInsets.Type.systemBars())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.gameView.holder.addCallback(this)
|
binding.gameView.holder.addCallback(this)
|
||||||
|
Loading…
Reference in New Issue
Block a user