pull/32/head
kunfei 5 years ago
parent 84f179fc00
commit ca2ca0caa5
  1. 7
      app/src/main/java/io/legado/app/base/BaseActivity.kt

@ -77,10 +77,13 @@ abstract class BaseActivity(private val layoutID: Int, private val fullScreen: B
private fun setupSystemBar() { private fun setupSystemBar() {
if (fullScreen) { if (fullScreen) {
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS or WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION) window.clearFlags(
WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
or WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
)
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility =
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
} }
ATH.setStatusbarColorAuto(this, fullScreen) ATH.setStatusbarColorAuto(this, fullScreen)
} }

Loading…
Cancel
Save