pull/457/head
gedoor 4 years ago
parent f3aaba87d3
commit 507f8fdd6f
  1. 5
      app/src/main/java/io/legado/app/base/BaseActivity.kt

@ -2,6 +2,7 @@ package io.legado.app.base
import android.content.Context import android.content.Context
import android.content.res.Configuration import android.content.res.Configuration
import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.util.AttributeSet import android.util.AttributeSet
import android.view.Menu import android.view.Menu
@ -34,7 +35,7 @@ abstract class BaseActivity(
val isInMultiWindow: Boolean val isInMultiWindow: Boolean
get() { get() {
return if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) { return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
isInMultiWindowMode isInMultiWindowMode
} else { } else {
false false
@ -63,7 +64,7 @@ abstract class BaseActivity(
setupSystemBar() setupSystemBar()
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(layoutID) setContentView(layoutID)
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
findViewById<TitleBar>(R.id.title_bar) findViewById<TitleBar>(R.id.title_bar)
?.onMultiWindowModeChanged(isInMultiWindowMode, fullScreen) ?.onMultiWindowModeChanged(isInMultiWindowMode, fullScreen)
} }

Loading…
Cancel
Save