更新界面

This commit is contained in:
HapeLee committed 2025-07-14 02:23:23 +08:00
1 parent 06dd2ac2c1
commit c35177715c
21 files changed
+745 -469

No files matched your search

@@ -3,54 +3,147 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
android:paddingHorizontal="16dp"
android:paddingVertical="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<io.legato.kazusa.ui.widget.text.AccentTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:text="@string/manga_color_filter"
android:textSize="18sp" />
<io.legato.kazusa.ui.widget.DetailSeekBar
android:id="@+id/dsb_brightness"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:max="255"
app:title="@string/brightness" />
android:gravity="center"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp">
<io.legato.kazusa.ui.widget.DetailSeekBar
android:id="@+id/dsb_r"
<View
android:layout_width="36dp"
android:layout_height="4dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dp"
android:background="@drawable/bg_bottom_sheet_handle" />
<TextView
android:id="@+id/bottom_sheet_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_color_filter"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:max="255"
app:title="R" />
android:gravity="center_vertical">
<io.legato.kazusa.ui.widget.DetailSeekBar
android:id="@+id/dsb_g"
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_brightness"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:max="255"
app:title="@string/brightness" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<com.google.android.material.chip.Chip
android:id="@+id/chip_autoBrightness"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="跟随系统" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:max="255"
app:title="G" />
android:gravity="center_vertical"
android:orientation="horizontal">
<io.legato.kazusa.ui.widget.DetailSeekBar
android:id="@+id/dsb_b"
<com.google.android.material.chip.Chip
android:id="@+id/cp_epaper"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="@string/manga_epaper" />
<com.google.android.material.chip.Chip
android:id="@+id/cp_enableGray"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="灰度" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsbEpaper"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:max="255"
app:title="阈值" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:max="255"
app:title="B" />
android:gravity="center_vertical">
<io.legato.kazusa.ui.widget.DetailSeekBar
android:id="@+id/dsb_a"
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_r"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:max="255"
app:title="R" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_g"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:max="255"
app:title="G" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:max="255"
app:title="A" />
android:gravity="center_vertical">
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_b"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:max="255"
app:title="B" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_a"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:max="255"
app:title="A" />
</LinearLayout>
</LinearLayout>
@@ -2,168 +2,202 @@
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp">
<LinearLayout
android:id="@+id/root_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<io.legato.kazusa.ui.widget.text.AccentTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_footer_config"
android:textSize="18sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/manga_header_chapter"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp">
android:gravity="center"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp">
<io.legato.kazusa.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_chapter_label"
<View
android:layout_width="36dp"
android:layout_height="4dp"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dp"
android:background="@drawable/bg_bottom_sheet_handle" />
<TextView
android:id="@+id/bottom_sheet_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/manga_check_chapter_label" />
android:text="漫画设置"
android:textSize="18sp"
android:textStyle="bold" />
<io.legato.kazusa.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_chapter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="center"
android:text="@string/manga_check_chapter" />
<io.legato.kazusa.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_chapter_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="center"
android:text="@string/manga_check_chapter_name" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/manga_header_page"
android:textSize="14sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp">
android:gravity="center_vertical"
android:orientation="horizontal">
<io.legato.kazusa.lib.theme.view.ThemeCheckBox
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="@string/footer"
android:textSize="14sp" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<com.google.android.material.chip.ChipGroup
android:id="@+id/rg_footer_orientation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:selectionRequired="true"
app:singleSelection="true">
<com.google.android.material.chip.Chip
android:id="@+id/rb_left"
style="@style/Widget.Material3.Chip.Suggestion"
android:layout_width="34dp"
android:layout_height="wrap_content"
app:chipIcon="@drawable/ic_align_left"
app:chipIconEnabled="true" />
<com.google.android.material.chip.Chip
android:id="@+id/rb_center"
style="@style/Widget.Material3.Chip.Suggestion"
android:layout_width="34dp"
android:layout_height="wrap_content"
app:chipIcon="@drawable/ic_align_center"
app:chipIconEnabled="true" />
<com.google.android.material.chip.Chip
android:id="@+id/rb_hide"
style="@style/Widget.Material3.Chip.Suggestion"
android:layout_width="34dp"
android:layout_height="wrap_content"
app:chipIcon="@drawable/ic_visibility_off"
app:chipIconEnabled="true" />
</com.google.android.material.chip.ChipGroup>
</LinearLayout>
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="8dp"
app:cardBackgroundColor="?attr/colorSurfaceVariant"
app:cardCornerRadius="8dp"
app:strokeWidth="0dp">
<TextView
android:id="@+id/tv_chapter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp" />
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.chip.ChipGroup
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.chip.Chip
android:id="@+id/cb_chapter_name"
style="@style/Widget.Material3.Chip.Suggestion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="第三话" />
<com.google.android.material.chip.Chip
android:id="@+id/cb_page_number_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
style="@style/Widget.Material3.Chip.Suggestion"
android:text="@string/manga_check_page_label" />
<io.legato.kazusa.lib.theme.view.ThemeCheckBox
<com.google.android.material.chip.Chip
android:id="@+id/cb_page_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="center"
android:text="@string/manga_check_page_number" />
</LinearLayout>
style="@style/Widget.Material3.Chip.Suggestion"
android:text="4/30" />
<TextView
</com.google.android.material.chip.ChipGroup>
<com.google.android.material.chip.ChipGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/manga_header_progress"
android:textSize="14sp" />
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp">
<com.google.android.material.chip.Chip
android:id="@+id/cb_chapter_label"
style="@style/Widget.Material3.Chip.Suggestion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/manga_check_chapter_label" />
<io.legato.kazusa.lib.theme.view.ThemeCheckBox
<com.google.android.material.chip.Chip
android:id="@+id/cb_chapter"
style="@style/Widget.Material3.Chip.Suggestion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1 / 45" />
<com.google.android.material.chip.Chip
android:id="@+id/cb_progress_ratio_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
style="@style/Widget.Material3.Chip.Suggestion"
android:text="@string/manga_check_progress_label" />
<io.legato.kazusa.lib.theme.view.ThemeCheckBox
<com.google.android.material.chip.Chip
android:id="@+id/cb_progress_ratio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="center"
android:text="@string/manga_check_progress" />
style="@style/Widget.Material3.Chip.Suggestion"
android:text="2.1%" />
</com.google.android.material.chip.ChipGroup>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.google.android.material.chip.Chip
android:id="@+id/chip_autoPage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/enable_auto_page_scroll" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/scv_autoPageSpeed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:max="100"
app:title="翻页速度" />
</LinearLayout>
<TextView
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_color_filter"
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/manga_header_footer"
android:textSize="14sp" />
android:text="@string/manga_color_filter" />
<RadioGroup
android:id="@+id/rg_footer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<io.legato.kazusa.lib.theme.view.ThemeRadioButton
android:id="@+id/rb_show"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/show" />
<io.legato.kazusa.lib.theme.view.ThemeRadioButton
android:id="@+id/rb_hide"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="center"
android:text="@string/hide" />
</RadioGroup>
<RadioGroup
android:id="@+id/rg_footer_orientation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<io.legato.kazusa.lib.theme.view.ThemeRadioButton
android:id="@+id/rb_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/manga_radio_left" />
<io.legato.kazusa.lib.theme.view.ThemeRadioButton
android:id="@+id/rb_center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:gravity="center"
android:text="@string/manga_radio_center" />
</RadioGroup>
</LinearLayout>
+1 -1
View File
@@ -7,7 +7,7 @@
android:background="?attr/selectableItemBackground"
android:ellipsize="end"
android:gravity="center"
android:padding="5dp"
android:padding="8dp"
android:maxLines="1"
android:scrollbars="none"
android:textSize="14sp"
+118 -53
View File
@@ -19,64 +19,60 @@
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="?attr/actionBarStyle"
android:alpha="0.92"
android:background="?attr/colorSurfaceContainer"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/title_bar_addition"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="16dp">
<TextView
android:id="@+id/tv_chapter_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tv_source_action"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
<TextView
android:id="@+id/tv_chapter_url"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:singleLine="true"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tv_source_action"
app:layout_constraintTop_toBottomOf="@+id/tv_chapter_name"
tools:visibility="visible" />
<io.legato.kazusa.ui.widget.text.AccentBgTextView
android:id="@+id/tv_source_action"
android:id="@+id/tv_book_name"
style="@style/TextAppearance.Material3.TitleLarge"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_margin="1dp"
android:gravity="center"
android:maxWidth="120dp"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:text="@string/book_source"
app:layout_constraintBottom_toBottomOf="@+id/tv_chapter_url"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:radius="2dp"
tools:visibility="visible" />
android:layout_height="wrap_content"
android:singleLine="true" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/title_bar_addition"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_chapter_name"
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="true" />
<TextView
android:id="@+id/tv_chapter_url"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:visibility="gone" />
<TextView
android:id="@+id/tv_source_action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingVertical="8dp"
android:text="@string/book_source" />
</LinearLayout>
</LinearLayout>
</io.legato.kazusa.ui.widget.TitleBar>
<LinearLayout
android:id="@+id/bottom_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:alpha="0.92"
android:importantForAccessibility="no"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent">
@@ -84,10 +80,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="8dp"
android:importantForAccessibility="no"
android:orientation="horizontal">
@@ -99,12 +93,20 @@
app:icon="@drawable/ic_previous"
tools:ignore="TouchTargetSizeCheck" />
<com.google.android.material.slider.Slider
android:id="@+id/seek_read_page"
<com.google.android.material.card.MaterialCardView
android:layout_width="0dp"
android:layout_height="25dp"
android:layout_gravity="center_vertical"
android:layout_weight="1" />
android:layout_height="wrap_content"
android:layout_weight="1"
app:cardBackgroundColor="?attr/colorSurfaceContainer"
app:cardCornerRadius="32dp"
app:strokeWidth="0dp">
<com.google.android.material.slider.Slider
android:id="@+id/seek_read_page"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical" />
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_next"
@@ -114,6 +116,69 @@
app:icon="@drawable/ic_next"
tools:ignore="TouchTargetSizeCheck" />
</LinearLayout>
<LinearLayout
android:id="@+id/bottom_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurfaceContainer"
android:importantForAccessibility="no"
android:orientation="horizontal"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/iv_catalog"
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@android:color/transparent"
android:contentDescription="@string/chapter_list"
android:maxHeight="24dp"
android:tooltipText="@string/chapter_list"
app:icon="@drawable/ic_toc"
app:iconGravity="textStart"
tools:ignore="NestedWeights" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:importantForAccessibility="no" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_autoPage"
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@android:color/transparent"
android:contentDescription="@string/auto_next_page"
android:tooltipText="@string/auto_next_page"
app:icon="@drawable/ic_auto_page"
app:iconGravity="textStart"
tools:ignore="UnusedAttribute" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:importantForAccessibility="no" />
<com.google.android.material.button.MaterialButton
android:id="@+id/iv_setting"
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@android:color/transparent"
android:contentDescription="@string/setting"
android:maxHeight="24dp"
android:tooltipText="@string/setting"
app:icon="@drawable/ic_settings"
app:iconGravity="textStart"
tools:ignore="NestedWeights" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -66,9 +66,6 @@
</LinearLayout>
</LinearLayout>
</io.legato.kazusa.ui.widget.TitleBar>
<LinearLayout