阅读设置布局相关优化 #259
This commit is contained in:
21 files changed
+245
-452
No files matched your search
@@ -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:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M436.41,888.13L436.41,640.72L523.83,640.72L523.83,720.72L848.13,720.72L848.13,808.13L523.83,808.13L523.83,888.13L436.41,888.13ZM111.87,808.13L111.87,720.72L356.41,720.72L356.41,808.13L111.87,808.13ZM253.17,551.87L340.48,551.87L384,431.26L576.28,431.26L618.57,551.87L706.83,551.87L525.63,71.87L434.37,71.87L253.17,551.87ZM408.48,359.15L478,161.83L481.52,161.83L550.8,359.15L408.48,359.15Z"/>
|
||||
</vector>
|
||||
@@ -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:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M280,800L280,280L80,280L80,160L600,160L600,280L400,280L400,800L280,800ZM640,800L640,480L520,480L520,360L880,360L880,480L760,480L760,800L640,800Z"/>
|
||||
</vector>
|
||||
@@ -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:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M249,831L249,280L49,280L49,129L600,129L600,280L400,280L400,831L249,831ZM640,831L640,511L520,511L520,360L911,360L911,511L791,511L791,831L640,831Z"/>
|
||||
</vector>
|
||||
@@ -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:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M315.38,764.62L315.38,244.62L115.38,244.62L115.38,195.38L564.62,195.38L564.62,244.62L364.62,244.62L364.62,764.62L315.38,764.62ZM675.38,764.62L675.38,444.62L555.38,444.62L555.38,395.38L844.62,395.38L844.62,444.62L724.62,444.62L724.62,764.62L675.38,764.62Z"/>
|
||||
</vector>
|
||||
@@ -24,7 +24,7 @@
|
||||
app:titleCollapseMode="scale">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:theme="@style/ThemeOverlay.Material3.Toolbar.CircleNavigationButton"
|
||||
android:theme="@style/ThemeOverlay.Material3.Toolbar.CircleNavigationButton"
|
||||
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
@@ -44,7 +44,8 @@ android:theme="@style/ThemeOverlay.Material3.Toolbar.CircleNavigationButton"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
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
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:minHeight="0dp"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
@@ -24,260 +23,25 @@
|
||||
android:id="@+id/bottom_sheet_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/text_font"
|
||||
android:textSize="18sp"
|
||||
android:text="@string/select_font"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/text_typeface"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.button.MaterialButtonGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:gravity="end|center_vertical">
|
||||
|
||||
<io.legado.app.ui.widget.AccentColorButton
|
||||
android:id="@+id/btn_text_color"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
|
||||
android:text="@string/text_color" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/sw_underline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||
app:icon="@drawable/ic_underline"
|
||||
android:checkable="true"
|
||||
android:focusable="true"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/sw_dottedline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||
app:icon="@drawable/ic_dottedline"
|
||||
android:checkable="true"
|
||||
android:focusable="true"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_textItalic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||
app:icon="@drawable/ic_format_italic"
|
||||
android:checkable="true"
|
||||
android:focusable="true"/>
|
||||
|
||||
</com.google.android.material.button.MaterialButtonGroup>
|
||||
|
||||
<com.google.android.material.button.MaterialButtonGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:gravity="end|center_vertical">
|
||||
|
||||
<io.legado.app.ui.widget.AccentColorButton
|
||||
android:id="@+id/btnShadowColor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
|
||||
android:text="@string/text_shadow_color" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_textShadow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||
app:icon="@drawable/ic_shadow"
|
||||
android:checkable="true"
|
||||
android:focusable="true"/>
|
||||
|
||||
</com.google.android.material.button.MaterialButtonGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/textFontWeightConverter"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="0dp"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<com.google.android.material.slider.Slider
|
||||
android:id="@+id/sliderFontWeight"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:stepSize="1"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="20"
|
||||
app:thumbHeight="24dp"
|
||||
app:trackHeight="24dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/shadow_typeface"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<io.legado.app.ui.widget.SimpleSliderView
|
||||
android:id="@+id/dsb_shadow_dx"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_weight="1"
|
||||
app:isBottomBackground="true"
|
||||
app:max="20"
|
||||
app:title="@string/text_shadow_x" />
|
||||
|
||||
<io.legado.app.ui.widget.SimpleSliderView
|
||||
android:id="@+id/dsb_shadow_dy"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:isBottomBackground="true"
|
||||
app:max="20"
|
||||
app:title="@string/text_shadow_y" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="bottom">
|
||||
|
||||
<io.legado.app.ui.widget.SimpleSliderView
|
||||
android:id="@+id/dsb_shadow_radius"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_weight="1"
|
||||
app:isBottomBackground="true"
|
||||
app:max="50"
|
||||
app:title="@string/text_shadow_radius" />
|
||||
|
||||
<io.legado.app.ui.widget.SimpleSliderView
|
||||
android:id="@+id/btn_indent_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:title="@string/text_indent"
|
||||
app:max="4" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<io.legado.app.ui.widget.SimpleSliderView
|
||||
android:id="@+id/dsb_paragraph_spacing"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_weight="1"
|
||||
app:max="20"
|
||||
app:isBottomBackground="true"
|
||||
app:title="@string/paragraph_size" />
|
||||
|
||||
<io.legado.app.ui.widget.SimpleSliderView
|
||||
android:id="@+id/dsb_line_size"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:isBottomBackground="true"
|
||||
app:max="20"
|
||||
app:title="@string/line_size" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<io.legado.app.ui.widget.SimpleSliderView
|
||||
android:id="@+id/dsb_text_letter_spacing"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:isBottomBackground="true"
|
||||
app:max="100"
|
||||
app:title="@string/text_letter_spacing" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/select_font"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.button.MaterialButtonGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:paddingHorizontal="16dp">
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_default_fonts"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
|
||||
android:text="@string/default_font"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_other_dir"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
|
||||
android:text="@string/other_folder"/>
|
||||
</com.google.android.material.button.MaterialButtonGroup>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="2dp" />
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_other_dir"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginVertical="8dp"
|
||||
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
|
||||
android:text="@string/other_folder"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -17,7 +17,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
|
||||
@@ -30,7 +30,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
@@ -287,6 +287,7 @@
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tool:listitem="@layout/item_read_style"
|
||||
app:layout_constraintStart_toEndOf="@id/cb_share_layout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
|
||||
@@ -12,22 +12,22 @@
|
||||
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
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="16dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:minHeight="0dp"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
android:paddingVertical="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bottom_sheet_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/header_footer"
|
||||
android:textSize="18sp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="32dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:orientation="vertical"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
|
||||
<io.legado.app.ui.widget.SimpleSliderView
|
||||
android:id="@+id/dsb_shadow_dx"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:isBottomBackground="true"
|
||||
app:max="20"
|
||||
app:title="@string/text_shadow_x" />
|
||||
|
||||
<io.legado.app.ui.widget.SimpleSliderView
|
||||
android:id="@+id/dsb_shadow_dy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:isBottomBackground="true"
|
||||
app:max="20"
|
||||
app:title="@string/text_shadow_y" />
|
||||
|
||||
<io.legado.app.ui.widget.SimpleSliderView
|
||||
android:id="@+id/dsb_shadow_radius"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:isBottomBackground="true"
|
||||
app:max="50"
|
||||
app:title="@string/text_shadow_radius" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -16,13 +16,13 @@
|
||||
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
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:minHeight="0dp"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/read_config"
|
||||
android:textSize="18sp"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -25,8 +25,14 @@
|
||||
android:id="@+id/loading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:progress="50"
|
||||
app:trackColor="?attr/colorOnSurfaceVariant"
|
||||
app:indicatorColor="?attr/colorPrimaryVariant"
|
||||
android:indeterminate="false"
|
||||
app:indicatorSize="64dp"
|
||||
app:waveAmplitude="2dp"
|
||||
app:wavelength="16dp"
|
||||
app:waveSpeed="50dp"
|
||||
android:layout_gravity="center" />
|
||||
|
||||
|
||||
@@ -44,8 +50,7 @@
|
||||
app:icon="@drawable/ic_refresh"
|
||||
app:iconSize="24sp"
|
||||
app:iconTint="?attr/colorSurfaceVariant"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/progress"
|
||||
|
||||
@@ -1337,4 +1337,6 @@
|
||||
<string name="long_click_to_custom">长按自定义</string>
|
||||
<string name="disable_manga_scroll_animation">禁用翻页动画</string>
|
||||
<string name="manga_cross_fade">禁用加载淡入动画</string>
|
||||
<string name="text_shadow_set">阴影设置</string>
|
||||
<string name="paragraph_typeface">段落样式</string>
|
||||
</resources>
|
||||
@@ -1338,4 +1338,6 @@
|
||||
<string name="long_click_to_custom">长按自定义</string>
|
||||
<string name="disable_manga_scroll_animation">禁用翻页动画</string>
|
||||
<string name="manga_cross_fade">禁用加载淡入动画</string>
|
||||
<string name="text_shadow_set">阴影设置</string>
|
||||
<string name="paragraph_typeface">段落样式</string>
|
||||
</resources>
|
||||
Reference in new issue
Block a user