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

pull/1693/head
kunfei 3 years ago
parent e3de23cc4c
commit 417c1c28a0
  1. 1
      app/src/main/assets/updateLog.md
  2. 2
      app/src/main/java/io/legado/app/constant/PreferKey.kt
  3. 2
      app/src/main/java/io/legado/app/ui/welcome/WelcomeActivity.kt
  4. 2
      app/src/main/res/values-es-rES/strings.xml
  5. 2
      app/src/main/res/values-ja-rJP/strings.xml
  6. 2
      app/src/main/res/values-pt-rBR/strings.xml
  7. 2
      app/src/main/res/values-zh-rHK/strings.xml
  8. 2
      app/src/main/res/values-zh-rTW/strings.xml
  9. 2
      app/src/main/res/values-zh/strings.xml
  10. 2
      app/src/main/res/values/strings.xml
  11. 18
      app/src/main/res/xml/pref_config_welcome.xml

@ -15,6 +15,7 @@
* 导入本地书籍界面添加排序功能 * 导入本地书籍界面添加排序功能
* 修复txt最后一句不显示的bug * 修复txt最后一句不显示的bug
* pro版本可以单独订阅启动画面
**2022/03/04** **2022/03/04**

@ -100,6 +100,8 @@ object PreferKey {
const val welcomeImageDark = "welcomeImagePathDark" const val welcomeImageDark = "welcomeImagePathDark"
const val welcomeShowText = "welcomeShowText" const val welcomeShowText = "welcomeShowText"
const val welcomeShowTextDark = "welcomeShowTextDark" const val welcomeShowTextDark = "welcomeShowTextDark"
const val welcomeShowIcon = "welcomeShowIcon"
const val welcomeShowIconDark = "welcomeShowIconDark"
const val cPrimary = "colorPrimary" const val cPrimary = "colorPrimary"
const val cAccent = "colorAccent" const val cAccent = "colorAccent"

@ -78,6 +78,7 @@ open class WelcomeActivity : BaseActivity<ActivityWelcomeBinding>() {
val size = windowSize val size = windowSize
BitmapUtils.decodeBitmap(path, size.widthPixels, size.heightPixels).let { BitmapUtils.decodeBitmap(path, size.widthPixels, size.heightPixels).let {
binding.tvLegado.visible(getPrefBoolean(PreferKey.welcomeShowTextDark)) binding.tvLegado.visible(getPrefBoolean(PreferKey.welcomeShowTextDark))
binding.ivBook.visible(getPrefBoolean(PreferKey.welcomeShowIconDark))
window.decorView.background = BitmapDrawable(resources, it) window.decorView.background = BitmapDrawable(resources, it)
return return
} }
@ -86,6 +87,7 @@ open class WelcomeActivity : BaseActivity<ActivityWelcomeBinding>() {
val size = windowSize val size = windowSize
BitmapUtils.decodeBitmap(path, size.widthPixels, size.heightPixels).let { BitmapUtils.decodeBitmap(path, size.widthPixels, size.heightPixels).let {
binding.tvLegado.visible(getPrefBoolean(PreferKey.welcomeShowText)) binding.tvLegado.visible(getPrefBoolean(PreferKey.welcomeShowText))
binding.ivBook.visible(getPrefBoolean(PreferKey.welcomeShowIcon))
window.decorView.background = BitmapDrawable(resources, it) window.decorView.background = BitmapDrawable(resources, it)
return return
} }

@ -952,5 +952,7 @@
<string name="welcome_text">阅读|享受美好时光</string> <string name="welcome_text">阅读|享受美好时光</string>
<string name="custom_welcome">自定义欢迎页</string> <string name="custom_welcome">自定义欢迎页</string>
<string name="custom_welcome_summary">是否使用自定义欢迎页</string> <string name="custom_welcome_summary">是否使用自定义欢迎页</string>
<string name="show_icon">显示图标</string>
<string name="show_default_book_icon">显示默认书籍图标</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -955,5 +955,7 @@
<string name="welcome_text">阅读|享受美好时光</string> <string name="welcome_text">阅读|享受美好时光</string>
<string name="custom_welcome">自定义欢迎页</string> <string name="custom_welcome">自定义欢迎页</string>
<string name="custom_welcome_summary">是否使用自定义欢迎页</string> <string name="custom_welcome_summary">是否使用自定义欢迎页</string>
<string name="show_icon">显示图标</string>
<string name="show_default_book_icon">显示默认书籍图标</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -955,5 +955,7 @@
<string name="welcome_text">阅读|享受美好时光</string> <string name="welcome_text">阅读|享受美好时光</string>
<string name="custom_welcome">自定义欢迎页</string> <string name="custom_welcome">自定义欢迎页</string>
<string name="custom_welcome_summary">是否使用自定义欢迎页</string> <string name="custom_welcome_summary">是否使用自定义欢迎页</string>
<string name="show_icon">显示图标</string>
<string name="show_default_book_icon">显示默认书籍图标</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -952,5 +952,7 @@
<string name="welcome_text">阅读|享受美好时光</string> <string name="welcome_text">阅读|享受美好时光</string>
<string name="custom_welcome">自定义欢迎页</string> <string name="custom_welcome">自定义欢迎页</string>
<string name="custom_welcome_summary">是否使用自定义欢迎页</string> <string name="custom_welcome_summary">是否使用自定义欢迎页</string>
<string name="show_icon">显示图标</string>
<string name="show_default_book_icon">显示默认书籍图标</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -954,5 +954,7 @@
<string name="welcome_text">阅读|享受美好时光</string> <string name="welcome_text">阅读|享受美好时光</string>
<string name="custom_welcome">自定义欢迎页</string> <string name="custom_welcome">自定义欢迎页</string>
<string name="custom_welcome_summary">是否使用自定义欢迎页</string> <string name="custom_welcome_summary">是否使用自定义欢迎页</string>
<string name="show_icon">显示图标</string>
<string name="show_default_book_icon">显示默认书籍图标</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -954,5 +954,7 @@
<string name="welcome_text">阅读|享受美好时光</string> <string name="welcome_text">阅读|享受美好时光</string>
<string name="custom_welcome">自定义欢迎页</string> <string name="custom_welcome">自定义欢迎页</string>
<string name="custom_welcome_summary">是否使用自定义欢迎页</string> <string name="custom_welcome_summary">是否使用自定义欢迎页</string>
<string name="show_icon">显示图标</string>
<string name="show_default_book_icon">显示默认书籍图标</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -955,5 +955,7 @@
<string name="welcome_text">阅读|享受美好时光</string> <string name="welcome_text">阅读|享受美好时光</string>
<string name="custom_welcome">自定义欢迎页</string> <string name="custom_welcome">自定义欢迎页</string>
<string name="custom_welcome_summary">是否使用自定义欢迎页</string> <string name="custom_welcome_summary">是否使用自定义欢迎页</string>
<string name="show_icon">显示图标</string>
<string name="show_default_book_icon">显示默认书籍图标</string>
<!-- string end --> <!-- string end -->
</resources> </resources>

@ -35,6 +35,15 @@
app:allowDividerBelow="false" app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="true"
android:key="welcomeShowIcon"
android:summary="@string/show_default_book_icon"
android:title="@string/show_icon"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
<io.legado.app.ui.widget.prefs.PreferenceCategory <io.legado.app.ui.widget.prefs.PreferenceCategory
@ -61,6 +70,15 @@
app:allowDividerBelow="false" app:allowDividerBelow="false"
app:iconSpaceReserved="false" /> app:iconSpaceReserved="false" />
<io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="true"
android:key="welcomeShowIconDark"
android:summary="@string/show_default_book_icon"
android:title="@string/show_icon"
app:allowDividerAbove="false"
app:allowDividerBelow="false"
app:iconSpaceReserved="false" />
</io.legado.app.ui.widget.prefs.PreferenceCategory> </io.legado.app.ui.widget.prefs.PreferenceCategory>
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>
Loading…
Cancel
Save