更新界面

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

No files matched your search

+54 -76
View File
@@ -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:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingTop="3dp"
android:paddingBottom="3dp">
<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" />
<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" />
<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
@@ -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.lib.theme.view.ThemeEditText
android:id="@+id/tie_book_name"
<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_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>