From 8a553e1229e60112789252373673fa1ed212e575 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 1 Mar 2020 21:21:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt | 3 ++- .../java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt | 2 ++ .../java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt | 2 ++ app/src/main/res/layout/dialog_read_aloud.xml | 1 + app/src/main/res/layout/dialog_read_book_style.xml | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt index 9b975e7e8..9d8ea8ba8 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt @@ -16,6 +16,7 @@ import io.legado.app.constant.EventBus import io.legado.app.constant.PreferKey import io.legado.app.help.ReadBookConfig import io.legado.app.lib.theme.ATH +import io.legado.app.lib.theme.bottomBackground import io.legado.app.ui.book.read.Help import io.legado.app.utils.getPrefBoolean import io.legado.app.utils.postEvent @@ -47,7 +48,7 @@ class MoreConfigDialog : DialogFragment() { savedInstanceState: Bundle? ): View? { val view = LinearLayout(context) - view.setBackgroundResource(R.color.background) + view.setBackgroundColor(requireContext().bottomBackground) view.id = R.id.tag1 container?.addView(view) return view diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt index 6040c0880..8cce7d4d2 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadAloudDialog.kt @@ -11,6 +11,7 @@ import androidx.fragment.app.DialogFragment import io.legado.app.R import io.legado.app.constant.EventBus import io.legado.app.help.AppConfig +import io.legado.app.lib.theme.bottomBackground import io.legado.app.service.BaseReadAloudService import io.legado.app.service.help.ReadAloud import io.legado.app.service.help.ReadBook @@ -54,6 +55,7 @@ class ReadAloudDialog : DialogFragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + ll_bottom_bg.setBackgroundColor(requireContext().bottomBackground) initData() initOnChange() initOnClick() diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt index 996eaa25c..f7355534a 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt @@ -14,6 +14,7 @@ import io.legado.app.constant.PreferKey import io.legado.app.help.ReadBookConfig import io.legado.app.lib.dialogs.selector import io.legado.app.lib.theme.accentColor +import io.legado.app.lib.theme.bottomBackground import io.legado.app.lib.theme.primaryColor import io.legado.app.ui.book.read.Help import io.legado.app.ui.book.read.ReadBookActivity @@ -71,6 +72,7 @@ class ReadStyleDialog : DialogFragment(), FontSelectDialog.CallBack { } private fun initView() { + root_view.setBackgroundColor(requireContext().bottomBackground) dsb_text_size.valueFormat = { (it + 5).toString() } diff --git a/app/src/main/res/layout/dialog_read_aloud.xml b/app/src/main/res/layout/dialog_read_aloud.xml index ea04696d4..627bd9414 100644 --- a/app/src/main/res/layout/dialog_read_aloud.xml +++ b/app/src/main/res/layout/dialog_read_aloud.xml @@ -60,6 +60,7 @@