pull/32/head
kunfei 5 years ago
parent 0ff5d733e6
commit 91acb02340
  1. 3
      app/src/main/java/io/legado/app/base/BaseActivity.kt

@ -8,6 +8,7 @@ import android.view.View
import android.view.WindowManager
import androidx.appcompat.app.AppCompatActivity
import io.legado.app.R
import io.legado.app.help.ActivityHelp
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.ColorUtils
import io.legado.app.lib.theme.ThemeStore
@ -26,6 +27,7 @@ abstract class BaseActivity(private val layoutID: Int, private val fullScreen: B
initTheme()
setupSystemBar()
super.onCreate(savedInstanceState)
ActivityHelp.getInstance()?.add(this)
setContentView(layoutID)
onActivityCreated(savedInstanceState)
observeLiveBus()
@ -34,6 +36,7 @@ abstract class BaseActivity(private val layoutID: Int, private val fullScreen: B
override fun onDestroy() {
super.onDestroy()
cancel()
ActivityHelp.getInstance()?.remove(this)
}
abstract fun onActivityCreated(savedInstanceState: Bundle?)

Loading…
Cancel
Save