feat: 优化

pull/209/head
kunfei 5 years ago
parent 644ee089fe
commit 31f390a1d2
  1. 3
      app/src/main/java/io/legado/app/ui/widget/prefs/Preference.kt
  2. 4
      app/src/main/res/layout/view_preference.xml
  3. 8
      app/src/main/res/values-zh-rHK/strings.xml
  4. 2
      app/src/main/res/values/strings.xml

@ -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)

@ -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">
<ImageView
@ -41,7 +42,6 @@
<TextView
android:id="@+id/preference_desc"
android:paddingBottom="8dp"
android:textSize="14sp"
android:textColor="@color/tv_text_summary"
android:text="@string/default1"

@ -401,7 +401,7 @@
<string name="rule_chapter_name">章節名稱規則 (ChapterName)</string>
<string name="rule_chapter_url">章節 URL 規則 (chapterUrl)</string>
<string name="rule_is_vip">VIP 標識 (isVip)</string>
<string name="rule_update_time">章節信息 (ChapterInfo)</string>
<string name="rule_update_time">更新時間 (ChapterInfo)</string>
<string name="rule_book_content">正文規則 (content)</string>
<string name="rule_next_content">正文下一頁 URL 規則 (nextContentUrl)</string>
<string name="rule_web_js">webJs</string>
@ -685,7 +685,7 @@
<string name="night_accent">夜間,強調色</string>
<string name="night_background_color">夜間,背景色</string>
<string name="night_navbar_color">夜間,導航欄顏色</string>
<string name="hideHeader">隐藏页</string>
<string name="hideFooter">隐藏页</string>
<string name="auto_change_source">动换</string>
<string name="hideHeader">隱藏頁</string>
<string name="hideFooter">隱藏頁</string>
<string name="auto_change_source">動換</string>
</resources>

@ -401,7 +401,7 @@
<string name="rule_chapter_name">章节名称规则(ChapterName)</string>
<string name="rule_chapter_url">章节URL规则(chapterUrl)</string>
<string name="rule_is_vip">VIP标识(isVip)</string>
<string name="rule_update_time">章节信息(ChapterInfo)</string>
<string name="rule_update_time">更新时间(ChapterInfo)</string>
<string name="rule_book_content">正文规则(content)</string>
<string name="rule_next_content">正文下一页URL规则(nextContentUrl)</string>
<string name="rule_web_js">webJs</string>

Loading…
Cancel
Save