Revert "优化"

This reverts commit 49484a1f
pull/1319/head
gedoor 3 years ago
parent c22ef0a842
commit 29f8389e6a
  1. 8
      app/src/main/java/io/legado/app/base/BaseActivity.kt

@ -12,6 +12,7 @@ import android.view.View
import android.widget.FrameLayout import android.widget.FrameLayout
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.viewbinding.ViewBinding import androidx.viewbinding.ViewBinding
import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.constant.AppConst import io.legado.app.constant.AppConst
import io.legado.app.constant.Theme import io.legado.app.constant.Theme
@ -78,6 +79,13 @@ abstract class BaseActivity<VB : ViewBinding>(
observeLiveBus() observeLiveBus()
} }
override fun onWindowFocusChanged(hasFocus: Boolean) {
super.onWindowFocusChanged(hasFocus)
if (hasFocus) {
App.navigationBarHeight = navigationBarHeight
}
}
override fun onMultiWindowModeChanged(isInMultiWindowMode: Boolean, newConfig: Configuration?) { override fun onMultiWindowModeChanged(isInMultiWindowMode: Boolean, newConfig: Configuration?) {
super.onMultiWindowModeChanged(isInMultiWindowMode, newConfig) super.onMultiWindowModeChanged(isInMultiWindowMode, newConfig)
findViewById<TitleBar>(R.id.title_bar) findViewById<TitleBar>(R.id.title_bar)

Loading…
Cancel
Save