From 14193f88cae9b1b55a68356e0ae5e470bdff2640 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 15 Feb 2020 22:30:54 +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 --- .../app/ui/widget/text/AccentTextView.kt | 22 ++++++++ .../main/res/layout/dialog_read_padding.xml | 55 ++++++++++++------- app/src/main/res/values/strings.xml | 11 +--- 3 files changed, 60 insertions(+), 28 deletions(-) create mode 100644 app/src/main/java/io/legado/app/ui/widget/text/AccentTextView.kt diff --git a/app/src/main/java/io/legado/app/ui/widget/text/AccentTextView.kt b/app/src/main/java/io/legado/app/ui/widget/text/AccentTextView.kt new file mode 100644 index 000000000..f797a9f57 --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/widget/text/AccentTextView.kt @@ -0,0 +1,22 @@ +package io.legado.app.ui.widget.text + +import android.content.Context +import android.util.AttributeSet +import androidx.appcompat.widget.AppCompatTextView +import io.legado.app.R +import io.legado.app.lib.theme.accentColor +import org.jetbrains.anko.textColor +import org.jetbrains.anko.textColorResource + +class AccentTextView(context: Context, attrs: AttributeSet?) : + AppCompatTextView(context, attrs) { + + init { + if (!isInEditMode) { + textColor = context.accentColor + } else { + textColorResource = R.color.colorAccent + } + } + +} diff --git a/app/src/main/res/layout/dialog_read_padding.xml b/app/src/main/res/layout/dialog_read_padding.xml index a127e6520..648f062a3 100644 --- a/app/src/main/res/layout/dialog_read_padding.xml +++ b/app/src/main/res/layout/dialog_read_padding.xml @@ -7,96 +7,111 @@ android:padding="10dp" android:orientation="vertical"> + + - + android:layout_height="wrap_content" + android:paddingTop="10dp" + android:paddingBottom="10dp" + android:textSize="18sp" + android:text="@string/main_body" /> - + android:layout_height="wrap_content" + android:paddingTop="10dp" + android:paddingBottom="10dp" + android:textSize="18sp" + android:text="@string/footer" /> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 18cc9ef42..61c3796cc 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -284,14 +284,6 @@ 下边距 左边距 右边距 - 页眉上 - 页眉下 - 页眉左 - 页眉右 - 页脚上 - 页脚下 - 页脚左 - 页脚右 校验书源 校验所选 进度 %d/%d @@ -618,4 +610,7 @@ 朗读设置 主界面 选择文本 + 页眉 + 正文 + 页角