fix: hide navigation bar on reader page on Android 11, closes #921 (#927)

This commit is contained in:
Huang Xin 2025-04-21 20:49:16 +08:00 committed by GitHub
parent 38e24da968
commit 8e96ef3e5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 4 deletions

View file

@ -177,8 +177,11 @@ class NativeBridgePlugin(private val activity: Activity): Plugin(activity) {
window.setDecorFitsSystemWindows(false)
val controller = window.insetsController
if (controller != null) {
controller.systemBarsBehavior =
WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
controller.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
} else {
controller.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_BARS_BY_SWIPE
}
if (isDarkMode) {
controller.setSystemBarsAppearance(