361 lines
15 KiB
XML
361 lines
15 KiB
XML
<?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"
|
|
xmlns:tool="http://schemas.android.com/tools"
|
|
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:orientation="vertical"
|
|
android:gravity="center"
|
|
android:paddingBottom="16dp"
|
|
android:paddingHorizontal="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"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
android:text="界面设置"
|
|
android:textSize="18sp"
|
|
android:textStyle="bold" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/tv_day_night"
|
|
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
|
android:layout_height="36dp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
app:iconSize="16dp"
|
|
app:icon="@drawable/ic_brightness"
|
|
app:iconGravity="textStart"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toEndOf="@id/bottom_sheet_title"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/set_bar"
|
|
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_vertical"
|
|
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"
|
|
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"
|
|
android:layout_weight="2"
|
|
android:text="@string/padding"
|
|
app:icon="@drawable/ic_padding"
|
|
app:iconGravity="textTop"
|
|
android:textSize="10sp"
|
|
tool:ignore="SmallSp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
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">
|
|
|
|
<io.legato.kazusa.ui.book.read.config.ChineseConverter
|
|
android:id="@+id/chinese_converter"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
style="@style/Widget.Material3Expressive.Button.OutlinedButton" />
|
|
|
|
<View
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1" />
|
|
|
|
<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"
|
|
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" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginHorizontal="16dp">
|
|
<io.legato.kazusa.ui.widget.SimpleCounterView
|
|
android:id="@+id/dsb_text_size"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:isBottomBackground="true"
|
|
app:max="45"
|
|
app:title="@string/text_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_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:gravity="center_vertical"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp"
|
|
android:layout_marginHorizontal="16dp">
|
|
|
|
<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
|
|
android:id="@+id/set_bottom_bar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/tv_page_anim"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="16dp"
|
|
android:layout_marginBottom="4dp"
|
|
android:text="@string/page_anim"
|
|
android:textColor="?android:attr/textColorSecondary"
|
|
android:textSize="12sp" />
|
|
|
|
<HorizontalScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:scrollbars="none">
|
|
|
|
<com.google.android.material.chip.ChipGroup
|
|
android:id="@+id/rg_page_anim"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:paddingHorizontal="16dp"
|
|
app:singleLine="true"
|
|
app:singleSelection="true"
|
|
app:selectionRequired="true">
|
|
|
|
<com.google.android.material.chip.Chip
|
|
android:id="@+id/rb_anim0"
|
|
style="@style/Widget.Material3.Chip.Filter"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/page_anim_cover" />
|
|
|
|
<!-- 滑动动画 Chip -->
|
|
<com.google.android.material.chip.Chip
|
|
android:id="@+id/rb_anim1"
|
|
style="@style/Widget.Material3.Chip.Filter"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="4dp"
|
|
android:text="@string/page_anim_slide" />
|
|
|
|
<!-- 仿真翻页 Chip -->
|
|
<com.google.android.material.chip.Chip
|
|
android:id="@+id/rb_simulation_anim"
|
|
style="@style/Widget.Material3.Chip.Filter"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="4dp"
|
|
android:text="@string/page_anim_simulation" />
|
|
|
|
<!-- 滚动动画 Chip -->
|
|
<com.google.android.material.chip.Chip
|
|
android:id="@+id/rb_scroll_anim"
|
|
style="@style/Widget.Material3.Chip.Filter"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="4dp"
|
|
android:text="@string/page_anim_scroll" />
|
|
|
|
<!-- 无动画 Chip -->
|
|
<com.google.android.material.chip.Chip
|
|
android:id="@+id/rb_no_anim"
|
|
style="@style/Widget.Material3.Chip.Filter"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="4dp"
|
|
android:text="@string/page_anim_none" />
|
|
|
|
</com.google.android.material.chip.ChipGroup>
|
|
</HorizontalScrollView>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="8dp"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
android:id="@+id/tv_bg_ts"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="16dp"
|
|
android:layout_weight="1"
|
|
android:textColor="?android:attr/textColorSecondary"
|
|
android:text="@string/text_bg_style"
|
|
android:textSize="12sp" />
|
|
|
|
<com.google.android.material.checkbox.MaterialCheckBox
|
|
android:id="@+id/cb_share_layout"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="20dp"
|
|
android:text="@string/share_layout"
|
|
android:layout_marginStart="6dp"
|
|
android:layout_marginEnd="16dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/rv_style"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginBottom="16dp"
|
|
android:clipToPadding="false"
|
|
android:orientation="horizontal"
|
|
android:paddingHorizontal="12dp"
|
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
tool:listitem="@layout/item_read_style" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
</androidx.core.widget.NestedScrollView>
|