更新界面

This commit is contained in:
HapeLee committed 2025-07-02 04:08:42 +08:00
1 parent 3908ff7cf2
commit ea36e85899
11 files changed
+160 -189

No files matched your search

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

@@ -2,7 +2,6 @@ package io.legato.kazusa.ui.book.info
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Intent import android.content.Intent
import android.graphics.Bitmap
import android.graphics.Color import android.graphics.Color
import android.graphics.RenderEffect import android.graphics.RenderEffect
import android.graphics.Shader import android.graphics.Shader
@@ -13,7 +12,6 @@ import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import android.view.View
import android.widget.CheckBox import android.widget.CheckBox
import android.widget.LinearLayout import android.widget.LinearLayout
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
@@ -21,9 +19,6 @@ import androidx.activity.viewModels
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import androidx.palette.graphics.Palette 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.R
import io.legato.kazusa.base.VMBaseActivity import io.legato.kazusa.base.VMBaseActivity
import io.legato.kazusa.constant.BookType 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.help.config.LocalConfig
import io.legato.kazusa.lib.dialogs.alert import io.legato.kazusa.lib.dialogs.alert
import io.legato.kazusa.lib.dialogs.selector 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.BookCover
import io.legato.kazusa.model.remote.RemoteBookWebDav import io.legato.kazusa.model.remote.RemoteBookWebDav
import io.legato.kazusa.ui.about.AppLogDialog import io.legato.kazusa.ui.about.AppLogDialog
@@ -348,8 +339,10 @@ class BookInfoActivity :
tvAuthor.text = getString(R.string.author_show, book.getRealAuthor()) tvAuthor.text = getString(R.string.author_show, book.getRealAuthor())
tvOrigin.text = getString(R.string.origin_show, book.originName) tvOrigin.text = getString(R.string.origin_show, book.originName)
tvLasted.text = getString(R.string.lasted_show, book.latestChapterTitle) tvLasted.text = getString(R.string.lasted_show, book.latestChapterTitle)
tvDetail.let { it.text = book.getDisplayIntro() } tvChapter.text = getString(R.string.read_chapter_total, book.totalChapterNum)
llToc.visible(!book.isWebFile) tvChapterIndex.text = getString(R.string.read_chapter_index, book.durChapterIndex)
tvDetail.text = book.getDisplayIntro()
tvToc.visible(!book.isWebFile)
upTvBookshelf() upTvBookshelf()
upKinds(book) upKinds(book)
upGroup(book.group) upGroup(book.group)
@@ -371,12 +364,10 @@ class BookInfoActivity :
lbKind.gone() lbKind.gone()
} else { } else {
lbKind.visible() lbKind.visible()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
lbKind.setLabels(kinds) lbKind.setLabels(kinds)
} }
} }
} }
}
private fun showCover(book: Book) { private fun showCover(book: Book) {
binding.ivCover.load(book.getDisplayCover(), book.name, book.author, false, book.origin) { binding.ivCover.load(book.getDisplayCover(), book.name, book.author, false, book.origin) {
@@ -3,9 +3,7 @@ package io.legato.kazusa.ui.widget
import android.content.Context import android.content.Context
import android.content.res.ColorStateList import android.content.res.ColorStateList
import android.graphics.Color import android.graphics.Color
import android.os.Build
import android.util.AttributeSet import android.util.AttributeSet
import androidx.annotation.RequiresApi
import com.google.android.material.chip.Chip import com.google.android.material.chip.Chip
import com.google.android.material.chip.ChipGroup import com.google.android.material.chip.ChipGroup
import com.google.android.material.color.MaterialColors import com.google.android.material.color.MaterialColors
@@ -19,8 +17,6 @@ class LabelsBar @JvmOverloads constructor(
private val unUsedChips = arrayListOf<Chip>() private val unUsedChips = arrayListOf<Chip>()
private val usedChips = arrayListOf<Chip>() private val usedChips = arrayListOf<Chip>()
@RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
fun setLabels(labels: List<String>) { fun setLabels(labels: List<String>) {
clear() clear()
labels.forEach { labels.forEach {
@@ -28,7 +24,6 @@ class LabelsBar @JvmOverloads constructor(
} }
} }
@RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
fun setLabels(labels: Array<String>) { fun setLabels(labels: Array<String>) {
setLabels(labels.toList()) setLabels(labels.toList())
} }
@@ -4,6 +4,6 @@
<gradient <gradient
android:angle="270" android:angle="270"
android:startColor="@android:color/transparent" android:startColor="@android:color/transparent"
android:endColor="@color/background_theme" android:endColor="?attr/colorSurface"
android:type="linear" /> android:type="linear" />
</shape> </shape>
@@ -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>
@@ -22,7 +22,7 @@
<com.google.android.material.appbar.CollapsingToolbarLayout <com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/collapsingToolbarLayoutLargeSize" android:layout_height="120dp"
style="?attr/collapsingToolbarLayoutLargeSize" style="?attr/collapsingToolbarLayoutLargeSize"
app:collapsedTitleTextAppearance="?attr/textAppearanceTitleLarge" app:collapsedTitleTextAppearance="?attr/textAppearanceTitleLarge"
app:expandedTitleTextAppearance="?attr/textAppearanceHeadlineLarge" app:expandedTitleTextAppearance="?attr/textAppearanceHeadlineLarge"
@@ -43,7 +43,6 @@
android:id="@+id/refresh_layout" android:id="@+id/refresh_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/bg_gradient_mask"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout <LinearLayout
@@ -61,8 +60,9 @@
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="96dp" android:layout_marginEnd="120dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginVertical="16dp"
app:cardCornerRadius="16dp"> app:cardCornerRadius="16dp">
<io.legato.kazusa.ui.widget.image.CoverImageView <io.legato.kazusa.ui.widget.image.CoverImageView
@@ -77,7 +77,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_gravity="center" android:layout_gravity="center"
android:orientation="vertical" android:orientation="vertical"
android:padding="12dp"> android:padding="12dp">
@@ -86,7 +86,6 @@
android:id="@+id/tv_name" android:id="@+id/tv_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxLines="2"
android:text="@string/book_name" android:text="@string/book_name"
style="@style/TextAppearance.Material3.ActionBar.Title" style="@style/TextAppearance.Material3.ActionBar.Title"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
@@ -152,7 +151,7 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<io.legato.kazusa.ui.widget.NoChildScrollNestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
@@ -168,7 +167,9 @@
android:id="@+id/ll_info" android:id="@+id/ll_info"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/bg_gradient_mask_land"
android:orientation="vertical" android:orientation="vertical"
android:layout_marginStart="16dp"
android:padding="8dp"> android:padding="8dp">
<HorizontalScrollView <HorizontalScrollView
@@ -181,7 +182,7 @@
android:id="@+id/lb_kind" android:id="@+id/lb_kind"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone" /> android:visibility="visible" />
</HorizontalScrollView> </HorizontalScrollView>
@@ -195,16 +196,13 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal">
android:weightSum="4"
android:gravity="center_vertical">
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btn_shelf" android:id="@+id/btn_shelf"
style="@style/Widget.Material3.Button.TextButton" style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginEnd="6dp" android:layout_marginEnd="6dp"
android:padding="8dp" android:padding="8dp"
android:text="@string/remove_from_bookshelf" android:text="@string/remove_from_bookshelf"
@@ -217,11 +215,10 @@
<!-- 查看目录按钮 --> <!-- 查看目录按钮 -->
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/tv_toc_view" android:id="@+id/tv_toc_view"
style="@style/Widget.Material3.Button.TextButton" style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_marginHorizontal="8dp"
android:layout_marginStart="8dp"
android:padding="8dp" android:padding="8dp"
android:text="@string/view_toc" android:text="@string/view_toc"
android:textSize="13sp" android:textSize="13sp"
@@ -233,11 +230,10 @@
<!-- 更换分组按钮 --> <!-- 更换分组按钮 -->
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/tv_change_group" android:id="@+id/tv_change_group"
style="@style/Widget.Material3.Button.TextButton" style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_marginHorizontal="8dp"
android:layout_marginStart="8dp"
android:padding="8dp" android:padding="8dp"
android:text="@string/change_group" android:text="@string/change_group"
android:textSize="13sp" android:textSize="13sp"
@@ -249,10 +245,9 @@
<!-- 更换来源按钮(保持原样) --> <!-- 更换来源按钮(保持原样) -->
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/btn_change_source" android:id="@+id/btn_change_source"
style="@style/Widget.Material3.Button.TextButton" style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:text="@string/book_source" android:text="@string/book_source"
android:padding="8dp" android:padding="8dp"
@@ -262,90 +257,72 @@
app:iconPadding="4dp" app:iconPadding="4dp"
app:iconSize="20dp" app:iconSize="20dp"
tools:contentDescription="@string/change_origin" /> tools:contentDescription="@string/change_origin" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_toc"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:paddingVertical="8dp"
android:orientation="horizontal" android:paddingHorizontal="2dp"
android:paddingTop="4dp" android:orientation="vertical">
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" />
<TextView <TextView
android:id="@+id/tv_toc" android:id="@+id/tv_toc"
android:layout_width="0dp"
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"
tools:text="@string/toc_s" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:paddingBottom="6dp"
android:orientation="horizontal" android:textSize="16sp"
android:paddingTop="3dp" android:textStyle="bold"
android:paddingBottom="3dp" tools:text="@string/toc_s" />
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 <TextView
android:id="@+id/tv_lasted" android:id="@+id/tv_lasted"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:paddingBottom="6dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:paddingRight="6dp"
android:singleLine="true" android:singleLine="true"
android:textSize="14sp" android:textSize="14sp"
tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry" tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
tools:text="@string/read_dur_progress" /> tools:text="@string/read_dur_progress" />
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:orientation="horizontal">
android:orientation="horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp"
tools:ignore="UseCompoundDrawables">
<ImageView <TextView
android:layout_width="18sp" android:id="@+id/tv_chapter"
android:layout_height="18sp" android:layout_width="wrap_content"
android:contentDescription="@string/read_dur_progress" android:layout_height="wrap_content"
android:paddingRight="2dp" android:textColor="?attr/colorSecondaryVariant"
android:src="@drawable/ic_groups" android:singleLine="true"
tools:ignore="RtlHardcoded,RtlSymmetry" /> 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>
</LinearLayout> </LinearLayout>
<TextView <TextView
@@ -353,10 +330,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginHorizontal="8dp"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:minHeight="48dp" android:minHeight="48dp"
android:paddingHorizontal="8dp"
android:paddingBottom="80dp" android:paddingBottom="80dp"
android:lineSpacingExtra="4dp" android:lineSpacingExtra="4dp"
android:text="@string/book_intro" android:text="@string/book_intro"
@@ -366,7 +343,7 @@
tools:ignore="RtlHardcoded,RtlSymmetry" /> tools:ignore="RtlHardcoded,RtlSymmetry" />
</LinearLayout> </LinearLayout>
</io.legato.kazusa.ui.widget.NoChildScrollNestedScrollView> </androidx.core.widget.NestedScrollView>
</LinearLayout> </LinearLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@@ -9,6 +8,7 @@
android:id="@+id/navigation_rail_view" android:id="@+id/navigation_rail_view"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="0dp" android:layout_height="0dp"
android:background="?attr/colorSurfaceContainer"
app:menuGravity="center" app:menuGravity="center"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
+52 -74
View File
@@ -45,7 +45,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<io.legato.kazusa.ui.widget.NoChildScrollNestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@@ -68,8 +68,6 @@
android:paddingHorizontal="16dp" android:paddingHorizontal="16dp"
android:paddingVertical="8dp"> android:paddingVertical="8dp">
<io.legato.kazusa.ui.widget.image.CoverImageView <io.legato.kazusa.ui.widget.image.CoverImageView
android:id="@+id/iv_cover" android:id="@+id/iv_cover"
android:layout_width="100dp" android:layout_width="100dp"
@@ -78,8 +76,6 @@
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/image_cover_default" /> android:src="@drawable/image_cover_default" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -102,7 +98,7 @@
android:gravity="center" android:gravity="center"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingTop="6dp" android:paddingTop="6dp"
android:paddingBottom="2dp" android:paddingBottom="6dp"
tools:ignore="UseCompoundDrawables"> tools:ignore="UseCompoundDrawables">
<ImageView <ImageView
@@ -117,7 +113,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginStart="2dp" android:layout_marginStart="4dp"
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:text="@string/author" android:text="@string/author"
@@ -130,7 +126,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<ImageView <ImageView
android:id="@+id/iv_web" android:id="@+id/iv_web"
@@ -145,7 +142,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:layout_marginStart="2dp" android:layout_marginStart="4dp"
android:ellipsize="end" android:ellipsize="end"
android:paddingRight="6dp" android:paddingRight="6dp"
android:singleLine="true" android:singleLine="true"
@@ -161,14 +158,13 @@
android:id="@+id/ll_info" android:id="@+id/ll_info"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/background_theme" android:background="?attr/colorSurface"
android:orientation="vertical" android:orientation="vertical">
android:padding="8dp">
<HorizontalScrollView <HorizontalScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="16dp"
android:scrollbars="none"> android:scrollbars="none">
<io.legato.kazusa.ui.widget.LabelsBar <io.legato.kazusa.ui.widget.LabelsBar
@@ -183,13 +179,13 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:paddingHorizontal="8dp"
android:paddingBottom="8dp"> android:paddingBottom="8dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingHorizontal="8dp"
android:weightSum="4" android:weightSum="4"
android:gravity="center_vertical"> android:gravity="center_vertical">
@@ -259,86 +255,68 @@
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_toc"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:paddingHorizontal="16dp"
android:orientation="horizontal" android:paddingVertical="8dp"
android:paddingTop="4dp" android:orientation="vertical">
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" />
<TextView <TextView
android:id="@+id/tv_toc" android:id="@+id/tv_toc"
android:layout_width="0dp"
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"
tools:text="@string/toc_s" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:paddingBottom="6dp"
android:orientation="horizontal" android:textSize="16sp"
android:paddingTop="3dp" android:textStyle="bold"
android:paddingBottom="3dp" tools:text="@string/toc_s" />
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 <TextView
android:id="@+id/tv_lasted" android:id="@+id/tv_lasted"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:paddingBottom="6dp"
android:ellipsize="end"
android:includeFontPadding="false"
android:paddingRight="6dp"
android:singleLine="true" android:singleLine="true"
android:textSize="14sp" android:textSize="14sp"
tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry" tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
tools:text="@string/read_dur_progress" /> tools:text="@string/read_dur_progress" />
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:orientation="horizontal">
android:orientation="horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp">
<ImageView <TextView
android:layout_width="18sp" android:id="@+id/tv_chapter"
android:layout_height="18sp" android:layout_width="wrap_content"
android:contentDescription="@string/read_dur_progress" android:layout_height="wrap_content"
android:paddingRight="2dp" android:textColor="?attr/colorSecondaryVariant"
android:src="@drawable/ic_groups" android:singleLine="true"
tools:ignore="RtlHardcoded,RtlSymmetry" /> 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>
</LinearLayout> </LinearLayout>
<TextView <TextView
@@ -349,7 +327,7 @@
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:minHeight="48dp" android:minHeight="48dp"
android:paddingHorizontal="8dp" android:paddingHorizontal="16dp"
android:paddingBottom="80dp" android:paddingBottom="80dp"
android:lineSpacingExtra="4dp" android:lineSpacingExtra="4dp"
android:text="@string/book_intro" android:text="@string/book_intro"
@@ -360,7 +338,7 @@
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</io.legato.kazusa.ui.widget.NoChildScrollNestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
@@ -12,6 +12,11 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:title="@string/book_info_edit" /> app:title="@string/book_info_edit" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -36,7 +41,7 @@
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
android:hint="@string/book_name"> android:hint="@string/book_name">
<io.legato.kazusa.lib.theme.view.ThemeEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/tie_book_name" android:id="@+id/tie_book_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -50,7 +55,7 @@
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:hint="@string/author"> android:hint="@string/author">
<io.legato.kazusa.lib.theme.view.ThemeEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/tie_book_author" android:id="@+id/tie_book_author"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -85,7 +90,7 @@
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
android:hint="@string/cover_path"> 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:id="@+id/tie_cover_url"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
@@ -133,11 +138,12 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/book_intro"> 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:id="@+id/tie_book_intro"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content" />
android:minLines="4" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout> </LinearLayout>
+7 -4
View File
@@ -84,7 +84,7 @@
<string name="origin_format">来源:%s</string> <string name="origin_format">来源:%s</string>
<string name="read_dur_progress">最近:%s</string> <string name="read_dur_progress">最近:%s</string>
<string name="book_name">书名</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="check_add_bookshelf">是否将《%s》放入书架?</string>
<string name="import_books_count">共 %s 个文本文件</string> <string name="import_books_count">共 %s 个文本文件</string>
<string name="is_loading">加载中…</string> <string name="is_loading">加载中…</string>
@@ -590,7 +590,7 @@
<string name="add_replace_rule">新建替换</string> <string name="add_replace_rule">新建替换</string>
<string name="group">分组</string> <string name="group">分组</string>
<string name="group_s">%s</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="enable_explore">启用发现</string>
<string name="disable_explore">禁用发现</string> <string name="disable_explore">禁用发现</string>
<string name="enable_selection">启用所选</string> <string name="enable_selection">启用所选</string>
@@ -686,7 +686,7 @@
<string name="change_group">设置分组</string> <string name="change_group">设置分组</string>
<string name="view_toc">查看目录</string> <string name="view_toc">查看目录</string>
<string name="bar_elevation">导航栏阴影</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="btn_default_s">默认</string>
<string name="main_menu">主菜单</string> <string name="main_menu">主菜单</string>
<string name="request_permission">点击授予权限</string> <string name="request_permission">点击授予权限</string>
@@ -802,7 +802,7 @@
<string name="auto_clear_expired">自动清除过期搜索数据</string> <string name="auto_clear_expired">自动清除过期搜索数据</string>
<string name="auto_clear_expired_summary">超过一天的搜索数据</string> <string name="auto_clear_expired_summary">超过一天的搜索数据</string>
<string name="re_segment">重新分段</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="empty_msg_import_book">点击右上角文件夹图标,选择文件夹</string>
<string name="scan_folder">智能扫描</string> <string name="scan_folder">智能扫描</string>
<string name="import_file_name">导入文件名</string> <string name="import_file_name">导入文件名</string>
@@ -1218,4 +1218,7 @@
<string name="hide_manga_title">隐藏漫画列表标题</string> <string name="hide_manga_title">隐藏漫画列表标题</string>
<string name="refresh_explore">刷新发现</string> <string name="refresh_explore">刷新发现</string>
<string name="change_icon_success">图标已修改</string> <string name="change_icon_success">图标已修改</string>
<string name="read_chapter_total">共 %d 章</string>
<string name="read_chapter_index">已读 %d 章</string>
</resources> </resources>
+3
View File
@@ -1223,4 +1223,7 @@
<string name="change_icon_success">图标已修改</string> <string name="change_icon_success">图标已修改</string>
<string name="replace_rule_title_setting">配置替换规则</string> <string name="replace_rule_title_setting">配置替换规则</string>
<string name="more_setting">更多设置</string> <string name="more_setting">更多设置</string>
<string name="read_chapter_total">共 %d 章</string>
<string name="read_chapter_index">已读 %d 章</string>
</resources> </resources>