From 31f390a1d2a70b86f9b1c05054c684a6b643b735 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 2 May 2020 21:36:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/widget/prefs/Preference.kt | 3 ++- app/src/main/res/layout/view_preference.xml | 4 ++-- app/src/main/res/values-zh-rHK/strings.xml | 8 ++++---- app/src/main/res/values/strings.xml | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt b/app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt index 2ebb11344..6226ab30a 100644 --- a/app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt +++ b/app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt @@ -8,6 +8,7 @@ import android.view.View import android.widget.FrameLayout import android.widget.ImageView import android.widget.TextView +import androidx.core.view.isGone import androidx.core.view.isVisible import androidx.preference.PreferenceViewHolder import io.legado.app.R @@ -45,7 +46,7 @@ class Preference(context: Context, attrs: AttributeSet) : val tvSummary = it.findViewById(R.id.preference_desc) if (tvSummary is TextView) { tvSummary.text = summary - tvSummary.isVisible = summary != null && summary.isNotEmpty() + tvSummary.isGone = summary.isNullOrEmpty() } val iconView = it.findViewById(R.id.preference_icon) diff --git a/app/src/main/res/layout/view_preference.xml b/app/src/main/res/layout/view_preference.xml index 87b10ef5b..c8d72c3bc 100644 --- a/app/src/main/res/layout/view_preference.xml +++ b/app/src/main/res/layout/view_preference.xml @@ -7,10 +7,11 @@ android:paddingLeft="16dp" android:paddingTop="10dp" android:paddingRight="16dp" - android:paddingBottom="4dp" + android:paddingBottom="10dp" android:minHeight="42dp" android:clickable="true" android:orientation="horizontal" + android:gravity="center_vertical" android:focusable="true"> 章節名稱規則 (ChapterName) 章節 URL 規則 (chapterUrl) VIP 標識 (isVip) - 章節信息 (ChapterInfo) + 更新時間 (ChapterInfo) 正文規則 (content) 正文下一頁 URL 規則 (nextContentUrl) webJs @@ -685,7 +685,7 @@ 夜間,強調色 夜間,背景色 夜間,導航欄顏色 - 隐藏页眉 - 隐藏页脚 - 自动换源 + 隱藏頁眉 + 隱藏頁脚 + 自動換源 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b3783a88b..339cdc437 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -401,7 +401,7 @@ 章节名称规则(ChapterName) 章节URL规则(chapterUrl) VIP标识(isVip) - 章节信息(ChapterInfo) + 更新时间(ChapterInfo) 正文规则(content) 正文下一页URL规则(nextContentUrl) webJs