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

pull/1689/head
kunfei 3 years ago
parent 876e86cabf
commit 6982ed8cc6
  1. 4
      app/src/main/java/io/legado/app/ui/config/ConfigActivity.kt
  2. 2
      app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt
  3. 2
      app/src/main/java/io/legado/app/ui/config/WelcomeConfigFragment.kt

@ -46,7 +46,9 @@ class ConfigActivity : BaseActivity<ActivityConfigBinding>() {
} }
override fun finish() { override fun finish() {
if (supportFragmentManager.findFragmentByTag(ConfigTag.COVER_CONFIG) != null) { if (supportFragmentManager.findFragmentByTag(ConfigTag.COVER_CONFIG) != null
|| supportFragmentManager.findFragmentByTag(ConfigTag.WELCOME_CONFIG) != null
) {
replaceFragment<ThemeConfigFragment>(ConfigTag.THEME_CONFIG) replaceFragment<ThemeConfigFragment>(ConfigTag.THEME_CONFIG)
} else { } else {
super.finish() super.finish()

@ -179,7 +179,7 @@ class ThemeConfigFragment : BasePreferenceFragment(),
"coverConfig" -> (activity as? ConfigActivity) "coverConfig" -> (activity as? ConfigActivity)
?.replaceFragment<CoverConfigFragment>(ConfigTag.COVER_CONFIG) ?.replaceFragment<CoverConfigFragment>(ConfigTag.COVER_CONFIG)
"welcomeStyle" -> (activity as? ConfigActivity) "welcomeStyle" -> (activity as? ConfigActivity)
?.replaceFragment<CoverConfigFragment>(ConfigTag.WELCOME_CONFIG) ?.replaceFragment<WelcomeConfigFragment>(ConfigTag.WELCOME_CONFIG)
} }
return super.onPreferenceTreeClick(preference) return super.onPreferenceTreeClick(preference)
} }

@ -36,7 +36,7 @@ class WelcomeConfigFragment : BasePreferenceFragment(),
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
activity?.setTitle(R.string.cover_config) activity?.setTitle(R.string.welcome_style)
listView.setEdgeEffectColor(primaryColor) listView.setEdgeEffectColor(primaryColor)
setHasOptionsMenu(true) setHasOptionsMenu(true)
} }

Loading…
Cancel
Save