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