pro版本添加自定义启动画面
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
|
||||
* 导入本地书籍界面添加排序功能
|
||||
* 修复txt最后一句不显示的bug
|
||||
* pro版本可以单独订阅启动画面
|
||||
|
||||
**2022/03/04**
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -952,5 +952,7 @@
|
||||
<string name="welcome_text">阅读|享受美好时光</string>
|
||||
<string name="custom_welcome">自定义欢迎页</string>
|
||||
<string name="custom_welcome_summary">是否使用自定义欢迎页</string>
|
||||
<string name="show_icon">显示图标</string>
|
||||
<string name="show_default_book_icon">显示默认书籍图标</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -955,5 +955,7 @@
|
||||
<string name="welcome_text">阅读|享受美好时光</string>
|
||||
<string name="custom_welcome">自定义欢迎页</string>
|
||||
<string name="custom_welcome_summary">是否使用自定义欢迎页</string>
|
||||
<string name="show_icon">显示图标</string>
|
||||
<string name="show_default_book_icon">显示默认书籍图标</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -955,5 +955,7 @@
|
||||
<string name="welcome_text">阅读|享受美好时光</string>
|
||||
<string name="custom_welcome">自定义欢迎页</string>
|
||||
<string name="custom_welcome_summary">是否使用自定义欢迎页</string>
|
||||
<string name="show_icon">显示图标</string>
|
||||
<string name="show_default_book_icon">显示默认书籍图标</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -952,5 +952,7 @@
|
||||
<string name="welcome_text">阅读|享受美好时光</string>
|
||||
<string name="custom_welcome">自定义欢迎页</string>
|
||||
<string name="custom_welcome_summary">是否使用自定义欢迎页</string>
|
||||
<string name="show_icon">显示图标</string>
|
||||
<string name="show_default_book_icon">显示默认书籍图标</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -954,5 +954,7 @@
|
||||
<string name="welcome_text">阅读|享受美好时光</string>
|
||||
<string name="custom_welcome">自定义欢迎页</string>
|
||||
<string name="custom_welcome_summary">是否使用自定义欢迎页</string>
|
||||
<string name="show_icon">显示图标</string>
|
||||
<string name="show_default_book_icon">显示默认书籍图标</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -954,5 +954,7 @@
|
||||
<string name="welcome_text">阅读|享受美好时光</string>
|
||||
<string name="custom_welcome">自定义欢迎页</string>
|
||||
<string name="custom_welcome_summary">是否使用自定义欢迎页</string>
|
||||
<string name="show_icon">显示图标</string>
|
||||
<string name="show_default_book_icon">显示默认书籍图标</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -955,5 +955,7 @@
|
||||
<string name="welcome_text">阅读|享受美好时光</string>
|
||||
<string name="custom_welcome">自定义欢迎页</string>
|
||||
<string name="custom_welcome_summary">是否使用自定义欢迎页</string>
|
||||
<string name="show_icon">显示图标</string>
|
||||
<string name="show_default_book_icon">显示默认书籍图标</string>
|
||||
<!-- string end -->
|
||||
</resources>
|
||||
|
||||
@@ -35,6 +35,15 @@
|
||||
app:allowDividerBelow="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
|
||||
@@ -61,6 +70,15 @@
|
||||
app:allowDividerBelow="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>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
||||
Reference in New Issue
Block a user