mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
Android: Replace deprecated setSystemUiVisibility
No functional change.
This commit is contained in:
parent
04c246d11f
commit
2fdeb85f0e
@ -19,7 +19,9 @@ import android.widget.Toast
|
|||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.appcompat.widget.PopupMenu
|
import androidx.appcompat.widget.PopupMenu
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowCompat
|
||||||
import androidx.core.view.WindowInsetsCompat
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import androidx.core.view.WindowInsetsControllerCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentActivity
|
||||||
import androidx.fragment.app.FragmentManager
|
import androidx.fragment.app.FragmentManager
|
||||||
@ -329,12 +331,11 @@ class EmulationActivity : AppCompatActivity(), ThemeProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun enableFullscreenImmersive() {
|
private fun enableFullscreenImmersive() {
|
||||||
window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
|
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or
|
WindowInsetsControllerCompat(window, window.decorView).let { controller ->
|
||||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
|
controller.hide(WindowInsetsCompat.Type.systemBars())
|
||||||
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or
|
controller.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
||||||
View.SYSTEM_UI_FLAG_FULLSCREEN or
|
}
|
||||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateDisplaySettings() {
|
private fun updateDisplaySettings() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user