feat(Cache/Export): ✨ 新增 开启自定义导出 菜单与对话框

This commit is contained in:
Discut
2023-05-22 21:00:37 +08:00
parent cfe9701c26
commit d95376448d
8 changed files with 268 additions and 0 deletions
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<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:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!-- <androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="ifContentScrolls"
android:paddingTop="6dp">-->
<LinearLayout
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:layout_marginTop="12dp"
android:orientation="horizontal">
<io.legado.app.ui.widget.checkbox.SmoothCheckBox
android:id="@+id/cb_all_export"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="6dp"
android:layout_marginEnd="16dp" />
<TextView
android:id="@+id/tv_all_export"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全部导出"
android:textSize="18sp" />
</LinearLayout>
<!-- <com.google.android.material.divider.MaterialDivider-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content" />-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<io.legado.app.ui.widget.checkbox.SmoothCheckBox
android:id="@+id/cb_select_export"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="6dp"
android:layout_marginEnd="16dp" />
<TextView
android:id="@+id/tv_select_export"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="选择导出"
android:textSize="18sp" />
</LinearLayout>
<io.legado.app.ui.widget.text.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:hint="每个文件包含章节大小">
<io.legado.app.lib.theme.view.ThemeEditText
android:id="@+id/et_epub_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number"
android:text="1"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
<io.legado.app.ui.widget.text.TextInputLayout
android:id="@+id/ly_et_input_scope"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="输出章节序号">
<io.legado.app.lib.theme.view.ThemeEditText
android:id="@+id/et_input_scope"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
</LinearLayout>
<!-- </androidx.core.widget.NestedScrollView>-->
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
+7
View File
@@ -31,6 +31,13 @@
android:checkable="true"
app:showAsAction="never" />
<!--自定义导出章节 选择菜单-->
<item
android:id="@+id/menu_enable_custom_export"
android:title="@string/custom_export_section"
android:checkable="true"
app:showAsAction="never" />
<item
android:id="@+id/menu_export_web_dav"
android:title="@string/export_to_web_dav"
+2
View File
@@ -31,6 +31,7 @@
<string name="delete_all">删除所有</string>
<string name="replace">替换</string>
<string name="replace_purify">替换净化</string>
<string name="custom_export_section">自定义导出章节</string>
<string name="replace_purify_desc">配置替换净化规则</string>
<string name="not_available">暂无</string>
<string name="enable">启用</string>
@@ -346,6 +347,7 @@
<string name="ps_show_all_find">关闭则只显示勾选源的发现</string>
<string name="update_toc">更新目录</string>
<string name="txt_toc_rule">TXT 目录规则</string>
<string name="select_section_export">选择待导出章节</string>
<string name="set_charset">设置编码</string>
<string name="swap_sort">倒序-顺序</string>
<string name="sort">排序</string>
+2
View File
@@ -30,6 +30,7 @@
<string name="edit">Edit</string>
<string name="delete">Delete</string>
<string name="delete_all">Delete all</string>
<string name="custom_export_section">Custom export chapter</string>
<string name="replace">Replace</string>
<string name="replace_purify">Replacement</string>
<string name="replace_purify_desc">Configure replacement rules</string>
@@ -347,6 +348,7 @@
<string name="ps_show_all_find">Display the selected origin\'s Discovery if closed</string>
<string name="update_toc">Update chapters</string>
<string name="txt_toc_rule">Txt Chapters Rule</string>
<string name="select_section_export">Choose some chapters to be exported</string>
<string name="set_charset">Text encoding</string>
<string name="swap_sort">Ascending/Descending order</string>
<string name="sort">Sort</string>