Update UI

This commit is contained in:
HapeLee committed 2025-06-03 03:02:00 +08:00
1 parent 96d2d65511
commit 63a3dfafbc
51 files changed
+437 -457

No files matched your search

@@ -196,7 +196,7 @@
android:scrollbars="none" />
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="6dp"
@@ -15,9 +15,10 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:orientation="vertical"
android:gravity="center_horizontal"
android:layout_margin="16dp">
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="8dp">
<io.legado.app.ui.widget.image.CoverImageView
android:id="@+id/iv_cover"
@@ -25,17 +26,10 @@
android:layout_height="130dp"
android:contentDescription="@string/img_cover"
android:scaleType="centerCrop"
android:layout_marginBottom="8dp"
android:src="@drawable/image_cover_default" />
</LinearLayout>
<!-- Book Info Fields -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="16dp">
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_book_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -47,9 +41,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_book_author"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -61,14 +55,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true" />
</io.legado.app.ui.widget.text.TextInputLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:orientation="vertical">
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
@@ -91,7 +78,7 @@
android:entries="@array/book_type" />
</LinearLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_cover_url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -102,7 +89,7 @@
android:id="@+id/tie_cover_url"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
@@ -110,31 +97,37 @@
android:orientation="horizontal"
android:layout_marginBottom="16dp">
<io.legado.app.ui.widget.text.StrokeTextView
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_select_cover"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/Widget.Material3.Button.TonalButton"
android:padding="8dp"
android:text="@string/select_local_image" />
<io.legado.app.ui.widget.text.StrokeTextView
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_change_cover"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_marginStart="8dp"
android:padding="8dp"
android:text="@string/change_cover_source" />
<io.legado.app.ui.widget.text.StrokeTextView
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_refresh_cover"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_marginStart="8dp"
android:padding="8dp"
android:text="@string/refresh_cover" />
</LinearLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_book_jj"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -145,6 +138,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minLines="4" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</LinearLayout>
@@ -15,7 +15,8 @@
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
android:scrollbars="none"
android:paddingHorizontal="12dp">
<LinearLayout
android:layout_width="wrap_content"
@@ -23,7 +24,6 @@
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="8dp"
tools:ignore="VisualLintBounds">
<TextView
@@ -77,7 +77,7 @@
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="fixed"
android:paddingStart="12dp"
tools:ignore="SpeakableTextPresentCheck" />
<androidx.recyclerview.widget.RecyclerView
@@ -24,9 +24,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp">
android:padding="16dp">
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -37,9 +37,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -50,9 +50,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_replace_rule"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -63,7 +63,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
@@ -84,12 +84,11 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_help"
app:tint="@color/primaryText"
android:contentDescription="@string/help" />
</LinearLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_replace_to"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -100,7 +99,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
@@ -125,7 +124,7 @@
</androidx.appcompat.widget.LinearLayoutCompat>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_scope"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -136,9 +135,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_exclude_scope"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -149,9 +148,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_timeout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -163,7 +162,7 @@
android:layout_height="wrap_content"
android:inputType="number"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</io.legado.app.ui.widget.NoChildScrollNestedScrollView>
@@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="8dp"
android:paddingHorizontal="12dp"
tools:ignore="VisualLintBounds">
<io.legado.app.lib.theme.view.ThemeCheckBox
@@ -58,7 +58,8 @@
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_height="wrap_content"
android:paddingHorizontal="12dp"
tools:ignore="SpeakableTextPresentCheck" />
<androidx.recyclerview.widget.RecyclerView
@@ -4,8 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/tool_bar"
@@ -22,7 +21,7 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:padding="8dp">
android:padding="16dp">
<io.legado.app.ui.widget.image.CoverImageView
android:id="@+id/iv_cover"
@@ -39,19 +38,19 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_group_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/group_name">
<io.legado.app.lib.theme.view.ThemeEditText
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tie_group_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
tools:ignore="TouchTargetSizeCheck,SpeakableTextPresentCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="wrap_content"
@@ -89,7 +88,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
android:gravity="center_vertical"
android:padding="16dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_delete"
@@ -4,8 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="12dp">
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/tool_bar"
@@ -33,9 +33,9 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="12dp">
android:padding="16dp">
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/name">
@@ -46,9 +46,9 @@
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/url_rule">
@@ -59,9 +59,9 @@
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/show_rule">
@@ -72,7 +72,7 @@
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
@@ -3,23 +3,20 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/tool_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="?attr/actionBarStyle"
app:titleTextAppearance="@style/ToolbarTitle" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_path"
android:layout_width="match_parent"
android:layout_height="24dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:elevation="5dp" />
android:paddingLeft="12dp"
android:paddingRight="12dp" />
<FrameLayout
android:layout_width="match_parent"
@@ -40,12 +37,12 @@
</FrameLayout>
<io.legado.app.ui.widget.text.AccentBgTextView
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_ok"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:layout_margin="3dp"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_margin="8dp"
android:text="@string/ok"
android:gravity="center" />
@@ -11,7 +11,6 @@
android:layout_height="wrap_content"
android:padding="6dp"
android:layout_gravity="center_horizontal"
android:textColor="@color/primaryText"
android:textSize="17sp" />
<androidx.appcompat.widget.AppCompatSeekBar
@@ -11,7 +11,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/layout_1"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -22,9 +22,9 @@
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/layout_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -36,7 +36,7 @@
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
@@ -72,6 +72,7 @@
android:id="@+id/tv_ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Widget.Material3.Button.UnelevatedButton"
android:padding="12dp"
android:text="@string/ok"
android:visibility="gone"
@@ -17,7 +17,6 @@
android:id="@+id/tool_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="5dp"
android:theme="?attr/actionBarStyle"
app:displayHomeAsUp="false"
app:fitStatusBar="false"
@@ -28,15 +27,15 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="6dp"
android:overScrollMode="ifContentScrolls">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:padding="16dp">
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/name">
@@ -47,9 +46,9 @@
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/regex">
@@ -60,9 +59,9 @@
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/example">
@@ -73,7 +72,7 @@
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
+2 -3
View File
@@ -6,7 +6,7 @@
android:padding="20dp"
android:orientation="horizontal">
<io.legado.app.lib.theme.view.ThemeProgressBar
<ProgressBar
android:id="@+id/pb"
android:layout_width="30dp"
android:layout_height="30dp"
@@ -19,6 +19,5 @@
android:layout_height="wrap_content"
android:padding="6dp"
android:gravity="center"
android:text="@string/loading"
android:textColor="@color/primaryText" />
android:text="@string/loading" />
</LinearLayout>
@@ -4,8 +4,7 @@
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"
android:fitsSystemWindows="true">
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/title_bar"
@@ -35,7 +34,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:background="?attr/colorSurface"
android:background="@color/transparent"
tools:ignore="RtlSymmetry" />
</com.google.android.material.appbar.AppBarLayout>
@@ -44,6 +43,7 @@
android:id="@+id/view_pager_bookshelf"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="8dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
+1 -2
View File
@@ -24,7 +24,7 @@
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:title="@string/discovery"
app:title="@string/rss"
app:layout_collapseMode="pin" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
@@ -34,7 +34,6 @@
layout="@layout/view_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginHorizontal="16dp" />
</com.google.android.material.appbar.AppBarLayout>
+79 -84
View File
@@ -1,102 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout 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="wrap_content"
android:orientation="vertical"
android:padding="6dp">
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingEnd="16dp"
android:paddingVertical="8dp">
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="center"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
android:layout_marginEnd="4dp"
android:gravity="center_vertical" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="3dp"
android:singleLine="true"
android:text="@string/book_name"
android:textColor="@color/primaryText"
android:textSize="15sp"
app:layout_constraintBottom_toTopOf="@id/tv_group_s"
app:layout_constraintLeft_toRightOf="@id/checkbox"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_author"
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingLeft="12dp"
android:paddingRight="8dp"
android:singleLine="true"
android:text="@string/author"
android:textColor="@color/tv_text_summary"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/tv_name"
app:layout_constraintLeft_toRightOf="@+id/tv_name"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_name"
tools:ignore="RtlHardcoded" />
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/tv_origin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:padding="3dp"
android:textColor="@color/tv_text_summary"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/checkbox"
app:layout_constraintTop_toBottomOf="@id/tv_author"
tools:text="书源" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/book_name"
android:textSize="20sp" />
<TextView
android:id="@+id/tv_group_s"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/no_group"
android:padding="3dp"
android:singleLine="true"
android:textColor="@color/secondaryText"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@+id/tv_origin"
app:layout_constraintRight_toLeftOf="@+id/tv_group"
app:layout_constraintTop_toBottomOf="@id/tv_author" />
<TextView
android:id="@+id/tv_author"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:singleLine="true"
android:text="@string/author"
android:textSize="12sp"
tools:ignore="RtlHardcoded" />
</LinearLayout>
<TextView
android:id="@+id/tv_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="10dp"
android:text="@string/group"
android:textColor="@color/secondaryText"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tv_delete"
app:layout_constraintTop_toBottomOf="@id/tv_author" />
<TextView
android:id="@+id/tv_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="10dp"
android:text="@string/delete"
android:textColor="@color/secondaryText"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_author" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="4dp">
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tv_origin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
tools:text="@string/book_source" />
<TextView
android:id="@+id/tv_group_s"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ungroup"
android:layout_marginStart="8dp"
android:singleLine="true"
android:textSize="12sp" />
</LinearLayout>
<!-- 按钮横向排列 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="end"
android:layout_marginTop="4dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Widget.Material3.Button.TonalButton"
android:padding="2dp"
android:text="@string/group" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Widget.Material3.Button.IconButton.Outlined"
app:icon="@drawable/ic_clear_all"
android:layout_marginStart="8dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
@@ -3,26 +3,25 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="8dp">
android:padding="16dp">
<TextView
android:id="@+id/tv_group"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/secondaryText"
tools:text="group" />
<TextView
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:padding="8dp"
android:text="@string/edit"
android:textColor="@color/secondaryText" />
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginEnd="8dp"
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
app:icon="@drawable/ic_edit" />
<io.legado.app.lib.theme.view.ThemeSwitch
android:id="@+id/sw_show"
+79 -82
View File
@@ -2,98 +2,95 @@
<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:id="@+id/cv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_item_focused_on_tv"
android:clickable="true"
android:focusable="true"
android:scrollbars="none"
tools:ignore="UnusedAttribute">
android:layout_height="wrap_content">
<LinearLayout
<com.google.android.material.card.MaterialCardView
android:id="@+id/cv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="8dp"
android:paddingTop="8dp"
android:paddingRight="8dp"
android:scrollbars="none"
android:layout_marginBottom="4dp"
android:foreground="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
app:strokeWidth="0dp"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
android:orientation="vertical">
<io.legado.app.ui.widget.image.CoverImageView
android:id="@+id/iv_cover"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 书封面 -->
<io.legado.app.ui.widget.image.CoverImageView
android:id="@+id/iv_cover"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:scaleType="centerCrop"
android:src="@drawable/image_cover_default"
android:transitionName="img_cover"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="ImageContrastCheck" />
<com.google.android.material.card.MaterialCardView
android:id="@+id/cd_unread"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:visibility="visible"
app:cardCornerRadius="4dp"
app:strokeWidth="0dp"
app:cardBackgroundColor="?attr/colorSecondaryVariant"
app:layout_constraintTop_toTopOf="@id/iv_cover"
app:layout_constraintEnd_toEndOf="@id/iv_cover">
<TextView
android:id="@+id/tv_unread"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?attr/colorSurface"
android:textSize="10sp"
android:padding="4dp"
android:textStyle="bold"
android:includeFontPadding="false"
tools:text="5"
tools:ignore="SmallSp" />
</com.google.android.material.card.MaterialCardView>
<!-- 加载指示器 -->
<com.google.android.material.progressindicator.CircularProgressIndicator
android:id="@+id/rl_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
app:layout_constraintTop_toTopOf="@id/iv_cover"
app:layout_constraintEnd_toEndOf="@id/iv_cover"
android:layout_margin="8dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 书名 -->
<TextView
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:scaleType="centerCrop"
android:scrollbars="none"
android:src="@drawable/image_cover_default"
android:transitionName="img_cover"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="UnusedAttribute,ImageContrastCheck"
tools:layout_editor_absoluteX="8dp" />
<io.legado.app.ui.widget.text.BadgeView
android:id="@+id/bv_unread"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:includeFontPadding="false"
android:scrollbars="none"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="4dp"
android:layout_marginHorizontal="8dp"
android:ellipsize="end"
android:gravity="left"
android:lines="2"
android:text="@string/book_name"
android:textSize="12sp"
android:textStyle="bold"
tools:ignore="RtlHardcoded" />
<io.legado.app.ui.widget.anima.RotateLoading
android:id="@+id/rl_loading"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_gravity="right"
android:scrollbars="none"
android:visibility="invisible"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:loading_width="2dp"
tools:ignore="RtlHardcoded" />
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:ellipsize="end"
android:gravity="top|center_horizontal"
android:includeFontPadding="false"
android:lines="2"
android:scrollbars="none"
android:text="@string/book_name"
android:textColor="@color/primaryText"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
</LinearLayout>
<View
android:id="@+id/vw_foreground"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="?android:attr/selectableItemBackground"
android:scrollbars="none"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
tools:layout_editor_absoluteX="0dp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.widget.ConstraintLayout>
+7 -7
View File
@@ -11,7 +11,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="@color/primaryText"
android:textSize="18sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/iv_download"
app:layout_constraintTop_toTopOf="parent"
@@ -22,7 +22,6 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="@color/primaryText"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/iv_download"
app:layout_constraintTop_toBottomOf="@+id/tv_name"
@@ -50,12 +49,13 @@
app:layout_constraintRight_toLeftOf="@+id/tv_export"
app:layout_constraintTop_toTopOf="@id/tv_name" />
<TextView
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_export"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:padding="10dp"
android:layout_width="48dp"
android:layout_height="36dp"
style="@style/Widget.Material3.Button.TonalButton"
android:textSize="12sp"
android:padding="0dp"
android:text="@string/export"
app:layout_constraintBottom_toBottomOf="@+id/tv_download"
app:layout_constraintRight_toRightOf="parent"
@@ -13,4 +13,5 @@
android:paddingEnd="16dp"
android:maxLines="1"
android:textSize="14sp"
android:textColor="?attr/colorPrimary"
tools:ignore="UnusedAttribute" />
+16 -18
View File
@@ -2,34 +2,32 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="8dp">
android:paddingHorizontal="16dp"
android:paddingVertical="8dp">
<TextView
android:id="@+id/tv_group"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/primaryText" />
style="@style/TextAppearance.AppCompat.Medium"
android:layout_weight="1" />
<TextView
android:id="@+id/tv_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:padding="8dp"
android:text="@string/edit"
android:textColor="@color/primaryText" />
<TextView
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_del"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:background="?attr/selectableItemBackground"
android:padding="8dp"
android:text="@string/delete"
android:textColor="@color/primaryText" />
style="@style/Widget.Material3.Button.IconButton.Outlined"
android:layout_marginEnd="4dp"
app:icon="@drawable/ic_clear_all" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
app:icon="@drawable/ic_edit" />
</LinearLayout>
@@ -2,7 +2,10 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingVertical="8dp"
android:paddingStart="12dp"
android:paddingEnd="16dp"
android:gravity="center_vertical"
android:orientation="horizontal">
@@ -12,15 +15,13 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:singleLine="true"
android:textColor="@color/primaryText" />
android:singleLine="true" />
<TextView
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:padding="8dp"
android:text="@string/edit" />
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
app:icon="@drawable/ic_edit" />
</LinearLayout>
@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:padding="16dp"
android:background="?attr/selectableItemBackground">
<ImageView
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<io.legado.app.ui.widget.text.TextInputLayout
<com.google.android.material.textfield.TextInputLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/textInputLayout"
@@ -17,4 +17,4 @@
android:inputType="textMultiLine"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout>
+1 -1
View File
@@ -6,7 +6,7 @@
android:theme="?attr/actionBarStyle"
android:background="@drawable/bg_searchview"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="36dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:imeOptions="actionSearch"
@@ -4,12 +4,11 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="2dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingEnd="16dp"
android:paddingTop="6dp"
android:paddingRight="8dp"
android:paddingStart="16dp"
android:paddingBottom="6dp"
tools:ignore="RtlHardcoded">
@@ -18,13 +17,14 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:padding="4dp"
android:text="@string/select_all" />
<io.legado.app.ui.widget.button.AccentStrokeButton
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_revert_selection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_margin="5dp"
android:gravity="center"
android:minWidth="72dp"
@@ -32,7 +32,7 @@
android:text="@string/revert_selection"
app:isBottomBackground="true" />
<io.legado.app.ui.widget.button.AccentStrokeButton
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_select_action_main"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -52,7 +52,6 @@
android:contentDescription="@string/more_menu"
android:padding="6dp"
android:src="@drawable/ic_more_vert"
android:tint="@color/primaryText"
android:tooltipText="@string/more_menu"
android:visibility="gone"
tools:ignore="RtlHardcoded,UnusedAttribute" />