From d0c976ea562347266a113511976bf5e06190d228 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 10 Nov 2020 21:41:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E7=82=B9=E5=87=BB=E7=BF=BB?= =?UTF-8?q?=E9=A1=B5=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../read/config/ClickActionConfigDialog.kt | 8 +- .../res/drawable/shape_translucent_card.xml | 6 ++ .../res/layout/dialog_click_action_config.xml | 75 ++++++++++++------- 3 files changed, 63 insertions(+), 26 deletions(-) create mode 100644 app/src/main/res/drawable/shape_translucent_card.xml diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ClickActionConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ClickActionConfigDialog.kt index 5880c0a44..d5d4e526a 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ClickActionConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ClickActionConfigDialog.kt @@ -6,6 +6,9 @@ import android.view.View import android.view.ViewGroup import io.legado.app.R import io.legado.app.base.BaseDialogFragment +import io.legado.app.utils.getCompatColor +import kotlinx.android.synthetic.main.dialog_click_action_config.* +import org.jetbrains.anko.sdk27.listeners.onClick class ClickActionConfigDialog : BaseDialogFragment() { @@ -26,7 +29,10 @@ class ClickActionConfigDialog : BaseDialogFragment() { } override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) { - + view.setBackgroundColor(getCompatColor(R.color.translucent)) + iv_close.onClick { + dismiss() + } } diff --git a/app/src/main/res/drawable/shape_translucent_card.xml b/app/src/main/res/drawable/shape_translucent_card.xml new file mode 100644 index 000000000..827bc335d --- /dev/null +++ b/app/src/main/res/drawable/shape_translucent_card.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_click_action_config.xml b/app/src/main/res/layout/dialog_click_action_config.xml index 6a7f157c2..70a859019 100644 --- a/app/src/main/res/layout/dialog_click_action_config.xml +++ b/app/src/main/res/layout/dialog_click_action_config.xml @@ -1,35 +1,42 @@ + android:text="@string/click_regional_config" + android:textColor="@color/white" /> + app:tint="@color/white" /> @@ -39,31 +46,37 @@ android:layout_weight="1" android:orientation="horizontal"> - - - @@ -74,31 +87,37 @@ android:layout_weight="1" android:orientation="horizontal"> - - + android:text="@string/menu" + android:textColor="@color/white" /> - @@ -109,32 +128,38 @@ android:layout_weight="1" android:orientation="horizontal"> - - -