重新设计界面设置布局

This commit is contained in:
HapeLee committed 2025-09-05 03:38:27 +08:00
1 parent ee703523de
commit cb60443323
14 files changed
+103 -511

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="@android:color/white"
android:pathData="M120,200L120,120L840,120L840,200L120,200ZM760,280Q793,280 816.5,303.5Q840,327 840,360L840,760Q840,793 816.5,816.5Q793,840 760,840L200,840Q167,840 143.5,816.5Q120,793 120,760L120,360Q120,327 143.5,303.5Q167,280 200,280L760,280ZM760,360L200,360Q200,360 200,360Q200,360 200,360L200,760Q200,760 200,760Q200,760 200,760L760,760Q760,760 760,760Q760,760 760,760L760,360Q760,360 760,360Q760,360 760,360ZM200,360Q200,360 200,360Q200,360 200,360L200,760Q200,760 200,760Q200,760 200,760L200,760Q200,760 200,760Q200,760 200,760L200,360Q200,360 200,360Q200,360 200,360Z" />
</vector>
@@ -1,99 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/root_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingBottom="16dp">
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/bottom_sheet_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="界面设置"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_text_letter_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:isBottomBackground="true"
app:max="100"
app:title="@string/text_letter_spacing" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginBottom="8dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_line_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:isBottomBackground="true"
app:max="20"
app:title="@string/line_size" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_paragraph_spacing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:isBottomBackground="true"
app:max="20"
app:title="@string/paragraph_size" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
@@ -17,7 +17,7 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:paddingBottom="16dp"
android:paddingBottom="8dp"
android:paddingHorizontal="16dp">
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
@@ -48,8 +48,10 @@
android:layout_height="36dp"
android:layout_width="wrap_content"
android:layout_marginStart="8dp"
android:textColor="?attr/colorTertiary"
app:iconSize="16dp"
app:icon="@drawable/ic_brightness"
app:backgroundTint="?attr/colorTertiaryContainer"
app:iconGravity="textStart"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/bottom_sheet_title"
@@ -71,151 +73,86 @@
android:orientation="horizontal"
android:layout_marginHorizontal="12dp" >
<io.legato.kazusa.ui.book.read.config.TextFontWeightConverter
android:id="@+id/text_font_weight_converter"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_width="64dp"
android:layout_height="64dp"
android:text="@string/font_weight_text"
android:layout_weight="2"
app:icon="@drawable/font_bold"
app:iconGravity="textTop"
android:textSize="10sp"
tool:ignore="SmallSp" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_text_font"
android:layout_width="64dp"
android:layout_height="64dp"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_weight="2"
android:text="@string/text_font"
app:icon="@drawable/font_style"
app:iconGravity="textTop"
android:textSize="10sp"
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="字体与间距"
app:icon="@drawable/ic_cfg_txt"
tool:ignore="SmallSp" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_text_indent"
android:layout_width="64dp"
android:layout_height="64dp"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_weight="2"
android:text="@string/text_indent"
app:icon="@drawable/ic_segment"
app:iconGravity="textTop"
android:textSize="10sp"
tool:ignore="SmallSp" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_padding"
android:layout_width="64dp"
android:layout_height="64dp"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_weight="2"
android:layout_height="wrap_content"
android:text="@string/padding"
app:icon="@drawable/ic_padding"
app:iconGravity="textTop"
android:textSize="10sp"
tool:ignore="SmallSp" />
</com.google.android.material.button.MaterialButtonGroup>
<com.google.android.material.button.MaterialButtonGroup
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:layout_marginHorizontal="16dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_weight="2"
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
android:text="@string/information" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
android:text="@string/more_setting" />
android:text="@string/information"
app:icon="@drawable/ic_header"
tool:ignore="SmallSp" />
</com.google.android.material.button.MaterialButtonGroup>
</LinearLayout>
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:layout_marginTop="4dp"
android:orientation="horizontal"
android:layout_marginTop="8dp"
android:gravity="bottom"
android:layout_marginHorizontal="16dp">
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_text_size"
android:layout_width="wrap_content"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_marginVertical="2dp"
app:orientation="horizontal"
app:isBottomBackground="true"
android:layout_marginBottom="2dp"
app:layout_constraintBottom_toBottomOf="parent"
app:max="45"
app:layout_constraintStart_toStartOf="parent"
app:orientation="vertical"
app:title="@string/text_size" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btnChineseConverter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/Widget.Material3Expressive.Button.IconButton.Outlined"
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
android:minWidth="0dp"
android:minHeight="0dp"
app:iconPadding="0dp"
app:icon="@drawable/ic_cn_convert"
app:iconGravity="textStart"
app:iconSize="16dp" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1" />
app:iconSize="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/tv_more"
app:layout_constraintStart_toEndOf="@id/dsb_text_size" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_spacing"
style="@style/Widget.Material3Expressive.Button.TonalButton"
android:id="@+id/tv_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="间距设置"
style="@style/Widget.Material3Expressive.Button.TonalButton"
app:icon="@drawable/ic_arrow_right"
app:iconGravity="textEnd" />
android:text="@string/more_setting"
app:iconGravity="end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
@@ -230,7 +167,6 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="4dp"
android:text="@string/page_anim"
android:textStyle="bold"
android:textSize="12sp" />
@@ -318,7 +254,7 @@
android:id="@+id/rv_style"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="16dp"
android:clipToPadding="false"
android:orientation="horizontal"
+33 -38
View File
@@ -59,20 +59,20 @@
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_header_padding_top"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:layout_weight="1"
app:max="100"
app:title="@string/padding_top" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_header_padding_bottom"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:max="100"
app:title="@string/padding_bottom" />
@@ -85,20 +85,20 @@
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_header_padding_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
app:max="100"
android:layout_weight="1"
app:title="@string/padding_left" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_header_padding_right"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:max="100"
app:title="@string/padding_right" />
@@ -122,20 +122,19 @@
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_padding_top"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:layout_weight="1"
app:max="200"
app:title="@string/padding_top" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_padding_bottom"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:max="100"
app:title="@string/padding_bottom" />
@@ -148,20 +147,19 @@
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_padding_left"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:layout_weight="1"
app:max="100"
app:title="@string/padding_left" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_padding_right"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:max="100"
app:title="@string/padding_right" />
@@ -202,20 +200,19 @@
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_footer_padding_top"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:layout_weight="1"
app:max="100"
app:title="@string/padding_top" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_footer_padding_bottom"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:max="100"
app:title="@string/padding_bottom" />
@@ -228,20 +225,18 @@
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_footer_padding_left"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:layout_weight="1"
app:max="100"
app:title="@string/padding_left" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_footer_padding_right"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
app:max="100"
app:title="@string/padding_right" />
@@ -87,7 +87,7 @@
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_title_top"
android:layout_width="wrap_content"
android:layout_width="140dp"
android:layout_height="wrap_content"
app:max="100"
app:title="@string/title_margin_top" />
@@ -99,7 +99,7 @@
<io.legato.kazusa.ui.widget.SimpleCounterView
android:id="@+id/dsb_title_bottom"
android:layout_width="wrap_content"
android:layout_width="140dp"
android:layout_height="wrap_content"
app:max="100"
app:title="@string/title_margin_bottom" />
@@ -5,7 +5,7 @@
<LinearLayout
android:id="@+id/layout_root"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
@@ -24,7 +24,7 @@
tools:ignore="RtlSymmetry" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
@@ -42,7 +42,7 @@
tools:ignore="RtlSymmetry" />
<com.google.android.material.card.MaterialCardView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="2dp"
app:cardBackgroundColor="?attr/colorSurfaceVariant"
@@ -50,7 +50,7 @@
app:strokeWidth="0dp">
<LinearLayout
android:layout_width="112dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
@@ -58,8 +58,10 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/iv_seek_reduce"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_width="40dp"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="3"
android:minWidth="64dp"
android:contentDescription="@string/reduce"
android:elevation="4dp"
app:backgroundTint="?attr/colorSurfaceContainer"
@@ -71,7 +73,7 @@
android:id="@+id/tvSeekValue"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_weight="2"
android:gravity="center"
android:text="@string/text"
android:textColor="?attr/colorSecondary"
@@ -81,8 +83,10 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/iv_seek_plus"
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
android:layout_width="40dp"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="3"
android:minWidth="64dp"
android:contentDescription="@string/plus"
android:elevation="4dp"
app:backgroundTint="?attr/colorSurfaceContainer"
+5 -5
View File
@@ -524,10 +524,10 @@
<string name="use_regex">使用正则表达式</string>
<string name="text_indent">缩进</string>
<string name="indent_0">无缩进</string>
<string name="indent_1">一字符缩进</string>
<string name="indent_2">二字符缩进</string>
<string name="indent_3">三字符缩进</string>
<string name="indent_4">四字符缩进</string>
<string name="indent_1">一字符</string>
<string name="indent_2">二字符</string>
<string name="indent_3">三字符</string>
<string name="indent_4">四字符</string>
<string name="select_folder">选择文件夹</string>
<string name="select_file">选择文件</string>
<string name="no_find">没有发现,可以在书源里添加。</string>
@@ -710,7 +710,7 @@
<string name="middle">中</string>
<string name="information">信息</string>
<string name="switchLayout">切换布局</string>
<string name="text_font_weight_converter">文章字重切换</string>
<string name="text_font_weight_converter">字重</string>
<string name="full_screen_gestures_support">全面屏手势优化</string>
<string name="disable_return_key">禁用返回键</string>