From 8aabd8c7d99b9f6943d4986390fb56c7bc156e43 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 26 Jul 2020 20:42:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/lib/theme/ATH.kt | 6 ++++++ app/src/main/java/io/legado/app/ui/book/read/Help.kt | 4 +++- .../legado/app/ui/book/source/manage/GroupManageDialog.kt | 4 ++-- app/src/main/res/values-zh-rHK/strings.xml | 2 ++ app/src/main/res/values-zh-rTW/strings.xml | 2 ++ app/src/main/res/values-zh/strings.xml | 2 ++ app/src/main/res/values/strings.xml | 2 ++ 7 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/lib/theme/ATH.kt b/app/src/main/java/io/legado/app/lib/theme/ATH.kt index 1b0bf723d..a7822b84b 100644 --- a/app/src/main/java/io/legado/app/lib/theme/ATH.kt +++ b/app/src/main/java/io/legado/app/lib/theme/ATH.kt @@ -5,6 +5,7 @@ import android.app.Activity import android.app.ActivityManager import android.content.Context import android.graphics.Color +import android.graphics.drawable.GradientDrawable import android.os.Build import android.view.View import android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR @@ -17,6 +18,7 @@ import androidx.viewpager.widget.ViewPager import com.google.android.material.bottomnavigation.BottomNavigationView import io.legado.app.R import io.legado.app.help.AppConfig +import io.legado.app.utils.dp import io.legado.app.utils.getCompatColor import kotlinx.android.synthetic.main.activity_main.view.* import org.jetbrains.anko.backgroundColor @@ -138,6 +140,10 @@ object ATH { } fun setAlertDialogTint(dialog: AlertDialog): AlertDialog { + val background = GradientDrawable() + background.cornerRadius = 3F.dp + background.setColor(dialog.context.backgroundColor) + dialog.window?.setBackgroundDrawable(background) val colorStateList = Selector.colorBuild() .setDefaultColor(ThemeStore.accentColor(dialog.context)) .setPressedColor(ColorUtils.darkenColor(ThemeStore.accentColor(dialog.context))) diff --git a/app/src/main/java/io/legado/app/ui/book/read/Help.kt b/app/src/main/java/io/legado/app/ui/book/read/Help.kt index 853a070da..aa2d82b55 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/Help.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/Help.kt @@ -20,6 +20,7 @@ import io.legado.app.lib.dialogs.noButton import io.legado.app.lib.dialogs.yesButton import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ThemeStore +import io.legado.app.lib.theme.backgroundColor import io.legado.app.service.help.Download import io.legado.app.service.help.ReadBook import io.legado.app.utils.applyTint @@ -131,6 +132,7 @@ object Help { LayoutInflater.from(context).inflate(R.layout.dialog_download_choice, null) .apply { view = this + setBackgroundColor(context.backgroundColor) edit_start.setText(book.durChapterIndex.toString()) edit_end.setText(book.totalChapterNum.toString()) } @@ -157,7 +159,7 @@ object Help { customView { layoutInflater.inflate(R.layout.dialog_edit_text, null).apply { editText = edit_view.apply { - hint = "备注内容" + setHint(R.string.note_content) } } } diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt index d4a466948..9ed695a01 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/GroupManageDialog.kt @@ -89,7 +89,7 @@ class GroupManageDialog : DialogFragment(), Toolbar.OnMenuItemClickListener { customView { layoutInflater.inflate(R.layout.dialog_edit_text, null).apply { editText = edit_view.apply { - hint = "分组名称" + setHint(R.string.group_name) } } } @@ -111,7 +111,7 @@ class GroupManageDialog : DialogFragment(), Toolbar.OnMenuItemClickListener { customView { layoutInflater.inflate(R.layout.dialog_edit_text, null).apply { editText = edit_view.apply { - hint = "分组名称" + setHint(R.string.group_name) setText(group) } } diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index c25e0c32a..031c4c3ed 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -726,4 +726,6 @@ 阅读界面设置 图片样式(imageStyle) 替换规则(replaceRegex) + 分组名称 + 备注内容 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index bb5b6ba27..5515e7a4f 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -726,5 +726,7 @@ 阅读界面设置 图片样式(imageStyle) 替换规则(replaceRegex) + 分组名称 + 备注内容 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 9ecea1099..9a45c4903 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -726,4 +726,6 @@ 阅读界面设置 图片样式(imageStyle) 替换规则(replaceRegex) + 分组名称 + 备注内容 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d7bdbec39..c2977d3eb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -727,5 +727,7 @@ 恢复忽略列表 恢复时忽略一些内容不恢复,方便不同手机配置不同 阅读界面设置 + 分组名称 + 备注内容 \ No newline at end of file