HapeLee 1 год назад
Родитель
Сommit
ea36e85899

+ 5 - 14
app/src/main/java/io/legato/kazusa/ui/book/info/BookInfoActivity.kt

@@ -2,7 +2,6 @@ package io.legato.kazusa.ui.book.info
 
 import android.annotation.SuppressLint
 import android.content.Intent
-import android.graphics.Bitmap
 import android.graphics.Color
 import android.graphics.RenderEffect
 import android.graphics.Shader
@@ -13,7 +12,6 @@ import android.os.Build
 import android.os.Bundle
 import android.view.Menu
 import android.view.MenuItem
-import android.view.View
 import android.widget.CheckBox
 import android.widget.LinearLayout
 import androidx.activity.result.contract.ActivityResultContracts
@@ -21,9 +19,6 @@ import androidx.activity.viewModels
 import androidx.core.content.ContextCompat
 import androidx.lifecycle.lifecycleScope
 import androidx.palette.graphics.Palette
-import com.google.android.material.button.MaterialButton
-import com.google.android.material.color.utilities.Hct
-import com.google.android.material.color.utilities.SchemeTonalSpot
 import io.legato.kazusa.R
 import io.legato.kazusa.base.VMBaseActivity
 import io.legato.kazusa.constant.BookType
@@ -46,10 +41,6 @@ import io.legato.kazusa.help.config.AppConfig
 import io.legato.kazusa.help.config.LocalConfig
 import io.legato.kazusa.lib.dialogs.alert
 import io.legato.kazusa.lib.dialogs.selector
-//import io.legado.app.lib.theme.accentColor
-//import io.legado.app.lib.theme.backgroundColor
-//import io.legado.app.lib.theme.bottomBackground
-//import io.legado.app.lib.theme.getPrimaryTextColor
 import io.legato.kazusa.model.BookCover
 import io.legato.kazusa.model.remote.RemoteBookWebDav
 import io.legato.kazusa.ui.about.AppLogDialog
@@ -348,8 +339,10 @@ class BookInfoActivity :
         tvAuthor.text = getString(R.string.author_show, book.getRealAuthor())
         tvOrigin.text = getString(R.string.origin_show, book.originName)
         tvLasted.text = getString(R.string.lasted_show, book.latestChapterTitle)
-        tvDetail.let { it.text = book.getDisplayIntro() }
-        llToc.visible(!book.isWebFile)
+        tvChapter.text = getString(R.string.read_chapter_total, book.totalChapterNum)
+        tvChapterIndex.text = getString(R.string.read_chapter_index, book.durChapterIndex)
+        tvDetail.text = book.getDisplayIntro()
+        tvToc.visible(!book.isWebFile)
         upTvBookshelf()
         upKinds(book)
         upGroup(book.group)
@@ -371,9 +364,7 @@ class BookInfoActivity :
                 lbKind.gone()
             } else {
                 lbKind.visible()
-                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
-                    lbKind.setLabels(kinds)
-                }
+                lbKind.setLabels(kinds)
             }
         }
     }

+ 0 - 5
app/src/main/java/io/legato/kazusa/ui/widget/LabelsBar.kt

@@ -3,9 +3,7 @@ package io.legato.kazusa.ui.widget
 import android.content.Context
 import android.content.res.ColorStateList
 import android.graphics.Color
-import android.os.Build
 import android.util.AttributeSet
-import androidx.annotation.RequiresApi
 import com.google.android.material.chip.Chip
 import com.google.android.material.chip.ChipGroup
 import com.google.android.material.color.MaterialColors
@@ -19,8 +17,6 @@ class LabelsBar @JvmOverloads constructor(
     private val unUsedChips = arrayListOf<Chip>()
     private val usedChips = arrayListOf<Chip>()
 
-
-    @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
     fun setLabels(labels: List<String>) {
         clear()
         labels.forEach {
@@ -28,7 +24,6 @@ class LabelsBar @JvmOverloads constructor(
         }
     }
 
-    @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
     fun setLabels(labels: Array<String>) {
         setLabels(labels.toList())
     }

+ 1 - 1
app/src/main/res/drawable/bg_gradient_mask.xml

@@ -4,6 +4,6 @@
     <gradient
         android:angle="270"
         android:startColor="@android:color/transparent"
-        android:endColor="@color/background_theme"
+        android:endColor="?attr/colorSurface"
         android:type="linear" />
 </shape>

+ 18 - 0
app/src/main/res/drawable/bg_gradient_mask_land.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <solid android:color="?attr/colorSurfaceContainer" />
+
+    <corners
+        android:topLeftRadius="16dp"
+        android:topRightRadius="0dp"
+        android:bottomLeftRadius="0dp"
+        android:bottomRightRadius="0dp" />
+
+    <padding
+        android:left="0dp"
+        android:top="0dp"
+        android:right="0dp"
+        android:bottom="0dp" />
+</shape>

+ 66 - 89
app/src/main/res/layout-land/activity_book_info.xml

@@ -22,7 +22,7 @@
 
         <com.google.android.material.appbar.CollapsingToolbarLayout
             android:layout_width="match_parent"
-            android:layout_height="?attr/collapsingToolbarLayoutLargeSize"
+            android:layout_height="120dp"
             style="?attr/collapsingToolbarLayoutLargeSize"
             app:collapsedTitleTextAppearance="?attr/textAppearanceTitleLarge"
             app:expandedTitleTextAppearance="?attr/textAppearanceHeadlineLarge"
@@ -43,7 +43,6 @@
         android:id="@+id/refresh_layout"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:background="@drawable/bg_gradient_mask"
         app:layout_behavior="@string/appbar_scrolling_view_behavior">
 
         <LinearLayout
@@ -61,8 +60,9 @@
                 <androidx.cardview.widget.CardView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginEnd="96dp"
+                    android:layout_marginEnd="120dp"
                     android:layout_marginStart="16dp"
+                    android:layout_marginVertical="16dp"
                     app:cardCornerRadius="16dp">
 
                     <io.legato.kazusa.ui.widget.image.CoverImageView
@@ -77,7 +77,7 @@
 
                 <LinearLayout
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
+                    android:layout_height="match_parent"
                     android:layout_gravity="center"
                     android:orientation="vertical"
                     android:padding="12dp">
@@ -86,7 +86,6 @@
                         android:id="@+id/tv_name"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:maxLines="2"
                         android:text="@string/book_name"
                         style="@style/TextAppearance.Material3.ActionBar.Title"
                         tools:ignore="RtlHardcoded" />
@@ -152,7 +151,7 @@
                 </LinearLayout>
             </LinearLayout>
 
-            <io.legato.kazusa.ui.widget.NoChildScrollNestedScrollView
+            <androidx.core.widget.NestedScrollView
                 android:id="@+id/scroll_view"
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
@@ -168,7 +167,9 @@
                         android:id="@+id/ll_info"
                         android:layout_width="match_parent"
                         android:layout_height="match_parent"
+                        android:background="@drawable/bg_gradient_mask_land"
                         android:orientation="vertical"
+                        android:layout_marginStart="16dp"
                         android:padding="8dp">
 
                         <HorizontalScrollView
@@ -181,7 +182,7 @@
                                 android:id="@+id/lb_kind"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:visibility="gone" />
+                                android:visibility="visible" />
 
                         </HorizontalScrollView>
 
@@ -195,16 +196,13 @@
                             <LinearLayout
                                 android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
-                                android:orientation="horizontal"
-                                android:weightSum="4"
-                                android:gravity="center_vertical">
+                                android:orientation="horizontal">
 
                                 <com.google.android.material.button.MaterialButton
                                     android:id="@+id/btn_shelf"
-                                    style="@style/Widget.Material3.Button.TextButton"
-                                    android:layout_width="0dp"
+                                    style="@style/Widget.Material3.Button.TonalButton"
+                                    android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:layout_weight="1"
                                     android:layout_marginEnd="6dp"
                                     android:padding="8dp"
                                     android:text="@string/remove_from_bookshelf"
@@ -217,11 +215,10 @@
                                 <!-- 查看目录按钮 -->
                                 <com.google.android.material.button.MaterialButton
                                     android:id="@+id/tv_toc_view"
-                                    style="@style/Widget.Material3.Button.TextButton"
-                                    android:layout_width="0dp"
+                                    style="@style/Widget.Material3.Button.TonalButton"
+                                    android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:layout_weight="1"
-                                    android:layout_marginStart="8dp"
+                                    android:layout_marginHorizontal="8dp"
                                     android:padding="8dp"
                                     android:text="@string/view_toc"
                                     android:textSize="13sp"
@@ -233,11 +230,10 @@
                                 <!-- 更换分组按钮 -->
                                 <com.google.android.material.button.MaterialButton
                                     android:id="@+id/tv_change_group"
-                                    style="@style/Widget.Material3.Button.TextButton"
-                                    android:layout_width="0dp"
+                                    style="@style/Widget.Material3.Button.TonalButton"
+                                    android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:layout_weight="1"
-                                    android:layout_marginStart="8dp"
+                                    android:layout_marginHorizontal="8dp"
                                     android:padding="8dp"
                                     android:text="@string/change_group"
                                     android:textSize="13sp"
@@ -249,10 +245,9 @@
                                 <!-- 更换来源按钮(保持原样) -->
                                 <com.google.android.material.button.MaterialButton
                                     android:id="@+id/btn_change_source"
-                                    style="@style/Widget.Material3.Button.TextButton"
-                                    android:layout_width="0dp"
+                                    style="@style/Widget.Material3.Button.TonalButton"
+                                    android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:layout_weight="1"
                                     android:layout_marginStart="8dp"
                                     android:text="@string/book_source"
                                     android:padding="8dp"
@@ -262,90 +257,72 @@
                                     app:iconPadding="4dp"
                                     app:iconSize="20dp"
                                     tools:contentDescription="@string/change_origin" />
+
                             </LinearLayout>
 
                             <LinearLayout
-                                android:id="@+id/ll_toc"
                                 android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
-                                android:gravity="center_vertical"
-                                android:orientation="horizontal"
-                                android:paddingTop="4dp"
-                                android:paddingBottom="4dp">
-
-                                <ImageView
-                                    android:layout_width="18sp"
-                                    android:layout_height="18sp"
-                                    android:contentDescription="@string/read_dur_progress"
-                                    android:paddingRight="2dp"
-                                    android:src="@drawable/ic_chapter"
-                                    tools:ignore="RtlHardcoded,RtlSymmetry" />
+                                android:paddingVertical="8dp"
+                                android:paddingHorizontal="2dp"
+                                android:orientation="vertical">
 
                                 <TextView
                                     android:id="@+id/tv_toc"
-                                    android:layout_width="0dp"
+                                    android:layout_width="match_parent"
                                     android:layout_height="wrap_content"
-                                    android:layout_weight="1"
-                                    android:ellipsize="end"
-                                    android:includeFontPadding="false"
-                                    android:paddingRight="6dp"
-                                    android:textSize="14sp"
-                                    tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
+                                    android:paddingBottom="6dp"
+                                    android:textSize="16sp"
+                                    android:textStyle="bold"
                                     tools:text="@string/toc_s" />
 
-                            </LinearLayout>
-
-                            <LinearLayout
-                                android:layout_width="match_parent"
-                                android:layout_height="wrap_content"
-                                android:gravity="center_vertical"
-                                android:orientation="horizontal"
-                                android:paddingTop="3dp"
-                                android:paddingBottom="3dp"
-                                tools:ignore="UseCompoundDrawables">
-
-                                <ImageView
-                                    android:id="@+id/ic_book_last"
-                                    android:layout_width="18sp"
-                                    android:layout_height="18sp"
-                                    android:contentDescription="@string/read_dur_progress"
-                                    android:paddingRight="2dp"
-                                    android:src="@drawable/ic_book_last"
-                                    tools:ignore="RtlHardcoded,RtlSymmetry" />
-
                                 <TextView
                                     android:id="@+id/tv_lasted"
-                                    android:layout_width="0dp"
+                                    android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:layout_weight="1"
-                                    android:ellipsize="end"
-                                    android:includeFontPadding="false"
-                                    android:paddingRight="6dp"
+                                    android:paddingBottom="6dp"
                                     android:singleLine="true"
                                     android:textSize="14sp"
                                     tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
                                     tools:text="@string/read_dur_progress" />
 
-                            </LinearLayout>
-
-                            <LinearLayout
-                                android:layout_width="match_parent"
-                                android:layout_height="wrap_content"
-                                android:gravity="center_vertical"
-                                android:orientation="horizontal"
-                                android:paddingTop="3dp"
-                                android:paddingBottom="3dp"
-                                tools:ignore="UseCompoundDrawables">
-
-                                <ImageView
-                                    android:layout_width="18sp"
-                                    android:layout_height="18sp"
-                                    android:contentDescription="@string/read_dur_progress"
-                                    android:paddingRight="2dp"
-                                    android:src="@drawable/ic_groups"
-                                    tools:ignore="RtlHardcoded,RtlSymmetry" />
+                                <LinearLayout
+                                    android:layout_width="match_parent"
+                                    android:layout_height="wrap_content"
+                                    android:orientation="horizontal">
+
+                                    <TextView
+                                        android:id="@+id/tv_chapter"
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:textColor="?attr/colorSecondaryVariant"
+                                        android:singleLine="true"
+                                        android:paddingEnd="8dp"
+                                        android:textSize="14sp"
+                                        android:textStyle="bold"
+                                        tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
+                                        tools:text="@string/read_chapter_total" />
+
+                                    <TextView
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="match_parent"
+                                        android:text="|"
+                                        android:textColor="?attr/colorSecondary"
+                                        android:layout_marginEnd="8dp"/>
+
+                                    <TextView
+                                        android:id="@+id/tv_chapter_index"
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:textColor="?attr/colorSecondary"
+                                        android:singleLine="true"
+                                        android:textSize="14sp"
+                                        tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
+                                        tools:text="@string/read_chapter_index"/>
+                                </LinearLayout>
 
                             </LinearLayout>
+
                         </LinearLayout>
 
                         <TextView
@@ -353,10 +330,10 @@
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
                             android:layout_marginTop="8dp"
+                            android:layout_marginHorizontal="8dp"
                             android:clickable="true"
                             android:focusable="true"
                             android:minHeight="48dp"
-                            android:paddingHorizontal="8dp"
                             android:paddingBottom="80dp"
                             android:lineSpacingExtra="4dp"
                             android:text="@string/book_intro"
@@ -366,7 +343,7 @@
                             tools:ignore="RtlHardcoded,RtlSymmetry" />
 
                     </LinearLayout>
-            </io.legato.kazusa.ui.widget.NoChildScrollNestedScrollView>
+            </androidx.core.widget.NestedScrollView>
         </LinearLayout>
     </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
 

+ 1 - 1
app/src/main/res/layout-land/activity_main.xml

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
@@ -9,6 +8,7 @@
         android:id="@+id/navigation_rail_view"
         android:layout_width="wrap_content"
         android:layout_height="0dp"
+        android:background="?attr/colorSurfaceContainer"
         app:menuGravity="center"
         app:layout_constraintTop_toTopOf="parent"
         app:layout_constraintBottom_toBottomOf="parent"

+ 56 - 78
app/src/main/res/layout/activity_book_info.xml

@@ -45,7 +45,7 @@
         android:layout_height="match_parent"
         app:layout_behavior="@string/appbar_scrolling_view_behavior">
 
-        <io.legato.kazusa.ui.widget.NoChildScrollNestedScrollView
+        <androidx.core.widget.NestedScrollView
             android:id="@+id/scroll_view"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
@@ -68,8 +68,6 @@
                     android:paddingHorizontal="16dp"
                     android:paddingVertical="8dp">
 
-
-
                         <io.legato.kazusa.ui.widget.image.CoverImageView
                             android:id="@+id/iv_cover"
                             android:layout_width="100dp"
@@ -78,8 +76,6 @@
                             android:scaleType="centerCrop"
                             android:src="@drawable/image_cover_default" />
 
-
-
                     <LinearLayout
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
@@ -102,7 +98,7 @@
                             android:gravity="center"
                             android:orientation="horizontal"
                             android:paddingTop="6dp"
-                            android:paddingBottom="2dp"
+                            android:paddingBottom="6dp"
                             tools:ignore="UseCompoundDrawables">
 
                             <ImageView
@@ -117,7 +113,7 @@
                                 android:layout_width="0dp"
                                 android:layout_height="wrap_content"
                                 android:layout_weight="1"
-                                android:layout_marginStart="2dp"
+                                android:layout_marginStart="4dp"
                                 android:ellipsize="end"
                                 android:singleLine="true"
                                 android:text="@string/author"
@@ -130,7 +126,8 @@
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
                             android:gravity="center_vertical"
-                            android:orientation="horizontal">
+                            android:orientation="horizontal"
+                            tools:ignore="UseCompoundDrawables">
 
                             <ImageView
                                 android:id="@+id/iv_web"
@@ -145,7 +142,7 @@
                                 android:layout_width="0dp"
                                 android:layout_height="wrap_content"
                                 android:layout_weight="1"
-                                android:layout_marginStart="2dp"
+                                android:layout_marginStart="4dp"
                                 android:ellipsize="end"
                                 android:paddingRight="6dp"
                                 android:singleLine="true"
@@ -161,14 +158,13 @@
                     android:id="@+id/ll_info"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
-                    android:background="@color/background_theme"
-                    android:orientation="vertical"
-                    android:padding="8dp">
+                    android:background="?attr/colorSurface"
+                    android:orientation="vertical">
 
                         <HorizontalScrollView
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:layout_marginStart="8dp"
+                            android:layout_marginStart="16dp"
                             android:scrollbars="none">
 
                             <io.legato.kazusa.ui.widget.LabelsBar
@@ -183,13 +179,13 @@
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:orientation="vertical"
-                        android:paddingHorizontal="8dp"
                         android:paddingBottom="8dp">
 
                         <LinearLayout
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
                             android:orientation="horizontal"
+                            android:paddingHorizontal="8dp"
                             android:weightSum="4"
                             android:gravity="center_vertical">
 
@@ -259,86 +255,68 @@
                         </LinearLayout>
 
                         <LinearLayout
-                            android:id="@+id/ll_toc"
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:gravity="center_vertical"
-                            android:orientation="horizontal"
-                            android:paddingTop="4dp"
-                            android:paddingBottom="4dp">
-
-                            <ImageView
-                                android:layout_width="18sp"
-                                android:layout_height="18sp"
-                                android:contentDescription="@string/read_dur_progress"
-                                android:paddingRight="2dp"
-                                android:src="@drawable/ic_chapter"
-                                tools:ignore="RtlHardcoded,RtlSymmetry" />
+                            android:paddingHorizontal="16dp"
+                            android:paddingVertical="8dp"
+                            android:orientation="vertical">
 
                             <TextView
                                 android:id="@+id/tv_toc"
-                                android:layout_width="0dp"
+                                android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
-                                android:layout_weight="1"
-                                android:ellipsize="end"
-                                android:includeFontPadding="false"
-                                android:paddingRight="6dp"
-                                android:textSize="14sp"
-                                tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
+                                android:paddingBottom="6dp"
+                                android:textSize="16sp"
+                                android:textStyle="bold"
                                 tools:text="@string/toc_s" />
 
-                        </LinearLayout>
-
-                        <LinearLayout
-                            android:layout_width="match_parent"
-                            android:layout_height="wrap_content"
-                            android:gravity="center_vertical"
-                            android:orientation="horizontal"
-                            android:paddingTop="3dp"
-                            android:paddingBottom="3dp"
-                            tools:ignore="UseCompoundDrawables">
-
-                            <ImageView
-                                android:id="@+id/ic_book_last"
-                                android:layout_width="18sp"
-                                android:layout_height="18sp"
-                                android:contentDescription="@string/read_dur_progress"
-                                android:paddingRight="2dp"
-                                android:src="@drawable/ic_book_last"
-                                tools:ignore="RtlHardcoded,RtlSymmetry" />
-
                             <TextView
                                 android:id="@+id/tv_lasted"
-                                android:layout_width="0dp"
+                                android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:layout_weight="1"
-                                android:ellipsize="end"
-                                android:includeFontPadding="false"
-                                android:paddingRight="6dp"
+                                android:paddingBottom="6dp"
                                 android:singleLine="true"
                                 android:textSize="14sp"
                                 tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
                                 tools:text="@string/read_dur_progress" />
 
-                        </LinearLayout>
-
-                        <LinearLayout
-                            android:layout_width="match_parent"
-                            android:layout_height="wrap_content"
-                            android:gravity="center_vertical"
-                            android:orientation="horizontal"
-                            android:paddingTop="3dp"
-                            android:paddingBottom="3dp">
-
-                            <ImageView
-                                android:layout_width="18sp"
-                                android:layout_height="18sp"
-                                android:contentDescription="@string/read_dur_progress"
-                                android:paddingRight="2dp"
-                                android:src="@drawable/ic_groups"
-                                tools:ignore="RtlHardcoded,RtlSymmetry" />
+                            <LinearLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="wrap_content"
+                                android:orientation="horizontal">
+
+                                <TextView
+                                    android:id="@+id/tv_chapter"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:textColor="?attr/colorSecondaryVariant"
+                                    android:singleLine="true"
+                                    android:paddingEnd="8dp"
+                                    android:textSize="14sp"
+                                    android:textStyle="bold"
+                                    tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
+                                    tools:text="@string/read_chapter_total" />
+
+                                <TextView
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="match_parent"
+                                    android:text="|"
+                                    android:textColor="?attr/colorSecondary"
+                                    android:layout_marginEnd="8dp"/>
+
+                                <TextView
+                                    android:id="@+id/tv_chapter_index"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:textColor="?attr/colorSecondary"
+                                    android:singleLine="true"
+                                    android:textSize="14sp"
+                                    tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
+                                    tools:text="@string/read_chapter_index"/>
+                            </LinearLayout>
 
                         </LinearLayout>
+
                     </LinearLayout>
 
                     <TextView
@@ -349,7 +327,7 @@
                         android:clickable="true"
                         android:focusable="true"
                         android:minHeight="48dp"
-                        android:paddingHorizontal="8dp"
+                        android:paddingHorizontal="16dp"
                         android:paddingBottom="80dp"
                         android:lineSpacingExtra="4dp"
                         android:text="@string/book_intro"
@@ -360,7 +338,7 @@
 
                 </LinearLayout>
             </LinearLayout>
-        </io.legato.kazusa.ui.widget.NoChildScrollNestedScrollView>
+        </androidx.core.widget.NestedScrollView>
     </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
 
     <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton

+ 44 - 38
app/src/main/res/layout/activity_book_info_edit.xml

@@ -12,50 +12,55 @@
         android:layout_height="wrap_content"
         app:title="@string/book_info_edit" />
 
-    <LinearLayout
+    <androidx.core.widget.NestedScrollView
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:gravity="center_horizontal"
-        android:layout_marginHorizontal="16dp"
-        android:layout_marginVertical="8dp">
-
-        <io.legato.kazusa.ui.widget.image.CoverImageView
-            android:id="@+id/iv_cover"
-            android:layout_width="90dp"
-            android:layout_height="130dp"
-            android:contentDescription="@string/img_cover"
-            android:scaleType="centerCrop"
-            android:layout_marginBottom="8dp"
-            android:src="@drawable/image_cover_default" />
-
-        <com.google.android.material.textfield.TextInputLayout
-            android:id="@+id/til_book_name"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:fillViewport="true">
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginBottom="12dp"
-            android:hint="@string/book_name">
+            android:orientation="vertical"
+            android:gravity="center_horizontal"
+            android:layout_marginHorizontal="16dp"
+            android:layout_marginVertical="8dp">
+
+            <io.legato.kazusa.ui.widget.image.CoverImageView
+                android:id="@+id/iv_cover"
+                android:layout_width="90dp"
+                android:layout_height="130dp"
+                android:contentDescription="@string/img_cover"
+                android:scaleType="centerCrop"
+                android:layout_marginBottom="8dp"
+                android:src="@drawable/image_cover_default" />
 
-            <io.legato.kazusa.lib.theme.view.ThemeEditText
-                android:id="@+id/tie_book_name"
+            <com.google.android.material.textfield.TextInputLayout
+                android:id="@+id/til_book_name"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:singleLine="true" />
-        </com.google.android.material.textfield.TextInputLayout>
+                android:layout_marginBottom="12dp"
+                android:hint="@string/book_name">
 
-        <com.google.android.material.textfield.TextInputLayout
-            android:id="@+id/til_book_author"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginBottom="16dp"
-            android:hint="@string/author">
+                <com.google.android.material.textfield.TextInputEditText
+                    android:id="@+id/tie_book_name"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:singleLine="true" />
+            </com.google.android.material.textfield.TextInputLayout>
 
-            <io.legato.kazusa.lib.theme.view.ThemeEditText
-                android:id="@+id/tie_book_author"
+            <com.google.android.material.textfield.TextInputLayout
+                android:id="@+id/til_book_author"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:singleLine="true" />
-        </com.google.android.material.textfield.TextInputLayout>
+                android:layout_marginBottom="16dp"
+                android:hint="@string/author">
+
+                <com.google.android.material.textfield.TextInputEditText
+                    android:id="@+id/tie_book_author"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:singleLine="true" />
+            </com.google.android.material.textfield.TextInputLayout>
 
             <LinearLayout
                 android:layout_width="match_parent"
@@ -85,7 +90,7 @@
                 android:layout_marginBottom="12dp"
                 android:hint="@string/cover_path">
 
-                <io.legato.kazusa.lib.theme.view.ThemeEditText
+                <com.google.android.material.textfield.TextInputEditText
                     android:id="@+id/tie_cover_url"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content" />
@@ -133,11 +138,12 @@
                 android:layout_height="wrap_content"
                 android:hint="@string/book_intro">
 
-                <io.legato.kazusa.lib.theme.view.ThemeEditText
+                <com.google.android.material.textfield.TextInputEditText
                     android:id="@+id/tie_book_intro"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:minLines="4" />
+                    android:layout_height="wrap_content" />
             </com.google.android.material.textfield.TextInputLayout>
         </LinearLayout>
+    </androidx.core.widget.NestedScrollView>
+
 </LinearLayout>

+ 7 - 4
app/src/main/res/values-zh/strings.xml

@@ -84,7 +84,7 @@
     <string name="origin_format">来源:%s</string>
     <string name="read_dur_progress">最近:%s</string>
     <string name="book_name">书名</string>
-    <string name="lasted_show">最新:%s</string>
+    <string name="lasted_show">最新 · %s</string>
     <string name="check_add_bookshelf">是否将《%s》放入书架?</string>
     <string name="import_books_count">共 %s 个文本文件</string>
     <string name="is_loading">加载中…</string>
@@ -590,7 +590,7 @@
     <string name="add_replace_rule">新建替换</string>
     <string name="group">分组</string>
     <string name="group_s">%s</string>
-    <string name="toc_s">已读:%s</string>
+    <string name="toc_s">在读 · %s</string>
     <string name="enable_explore">启用发现</string>
     <string name="disable_explore">禁用发现</string>
     <string name="enable_selection">启用所选</string>
@@ -686,7 +686,7 @@
     <string name="change_group">设置分组</string>
     <string name="view_toc">查看目录</string>
     <string name="bar_elevation">导航栏阴影</string>
-    <string name="bar_elevation_s">当前阴影大小(elevation):%s</string>
+    <string name="bar_elevation_s">当前阴影大小(elevation): %s</string>
     <string name="btn_default_s">默认</string>
     <string name="main_menu">主菜单</string>
     <string name="request_permission">点击授予权限</string>
@@ -802,7 +802,7 @@
     <string name="auto_clear_expired">自动清除过期搜索数据</string>
     <string name="auto_clear_expired_summary">超过一天的搜索数据</string>
     <string name="re_segment">重新分段</string>
-    <string name="style_name">样式名称:</string>
+    <string name="style_name">样式名称:</string>
     <string name="empty_msg_import_book">点击右上角文件夹图标,选择文件夹</string>
     <string name="scan_folder">智能扫描</string>
     <string name="import_file_name">导入文件名</string>
@@ -1218,4 +1218,7 @@
     <string name="hide_manga_title">隐藏漫画列表标题</string>
     <string name="refresh_explore">刷新发现</string>
     <string name="change_icon_success">图标已修改</string>
+    <string name="read_chapter_total">共 %d 章</string>
+    <string name="read_chapter_index">已读 %d 章</string>
+
 </resources>

+ 3 - 0
app/src/main/res/values/strings.xml

@@ -1223,4 +1223,7 @@
     <string name="change_icon_success">图标已修改</string>
     <string name="replace_rule_title_setting">配置替换规则</string>
     <string name="more_setting">更多设置</string>
+    <string name="read_chapter_total">共 %d 章</string>
+    <string name="read_chapter_index">已读 %d 章</string>
+
 </resources>