pro版本添加自定义启动画面

This commit is contained in:
kunfei
2022-03-06 18:46:55 +08:00
parent b3d46de1d9
commit e86b292d15
11 changed files with 37 additions and 0 deletions
@@ -100,6 +100,8 @@ object PreferKey {
const val welcomeImageDark = "welcomeImagePathDark"
const val welcomeShowText = "welcomeShowText"
const val welcomeShowTextDark = "welcomeShowTextDark"
const val welcomeShowIcon = "welcomeShowIcon"
const val welcomeShowIconDark = "welcomeShowIconDark"
const val cPrimary = "colorPrimary"
const val cAccent = "colorAccent"
@@ -78,6 +78,7 @@ open class WelcomeActivity : BaseActivity<ActivityWelcomeBinding>() {
val size = windowSize
BitmapUtils.decodeBitmap(path, size.widthPixels, size.heightPixels).let {
binding.tvLegado.visible(getPrefBoolean(PreferKey.welcomeShowTextDark))
binding.ivBook.visible(getPrefBoolean(PreferKey.welcomeShowIconDark))
window.decorView.background = BitmapDrawable(resources, it)
return
}
@@ -86,6 +87,7 @@ open class WelcomeActivity : BaseActivity<ActivityWelcomeBinding>() {
val size = windowSize
BitmapUtils.decodeBitmap(path, size.widthPixels, size.heightPixels).let {
binding.tvLegado.visible(getPrefBoolean(PreferKey.welcomeShowText))
binding.ivBook.visible(getPrefBoolean(PreferKey.welcomeShowIcon))
window.decorView.background = BitmapDrawable(resources, it)
return
}