替换规则添加作用于标题和作用于正文

This commit is contained in:
kunfei
2022-02-11 09:44:29 +08:00
parent 5e9f091123
commit a02c7b9859
9 changed files with 40 additions and 0 deletions
@@ -97,6 +97,8 @@ class ReplaceEditActivity :
etReplaceRule.setText(replaceRule.pattern)
cbUseRegex.isChecked = replaceRule.isRegex
etReplaceTo.setText(replaceRule.replacement)
cbScopeTitle.isChecked = replaceRule.scopeTitle
cbScopeContent.isChecked = replaceRule.scopeContent
etScope.setText(replaceRule.scope)
}
@@ -107,6 +109,8 @@ class ReplaceEditActivity :
replaceRule.pattern = etReplaceRule.text.toString()
replaceRule.isRegex = cbUseRegex.isChecked
replaceRule.replacement = etReplaceTo.text.toString()
replaceRule.scopeTitle = cbScopeTitle.isChecked
replaceRule.scopeContent = cbScopeTitle.isChecked
replaceRule.scope = etScope.text.toString()
return replaceRule
}
@@ -103,6 +103,28 @@
tools:ignore="SpeakableTextPresentCheck,TouchTargetSizeCheck" />
</io.legado.app.ui.widget.text.TextInputLayout>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content">
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_scope_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/scope_title"
android:checked="false" />
<io.legado.app.lib.theme.view.ThemeCheckBox
android:id="@+id/cb_scope_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="@string/scope_content"
android:checked="true"
tools:ignore="RtlHardcoded" />
</androidx.appcompat.widget.LinearLayoutCompat>
<io.legado.app.ui.widget.text.TextInputLayout
android:id="@+id/til_scope"
android:layout_width="match_parent"
@@ -930,5 +930,7 @@
<string name="sub_dir">子文件夹</string>
<string name="general">全局</string>
<string name="use_replace">使用替换</string>
<string name="scope_title">作用于标题</string>
<string name="scope_content">作用于正文</string>
<!-- string end -->
</resources>
@@ -933,5 +933,7 @@
<string name="sub_dir">子文件夹</string>
<string name="general">全局</string>
<string name="use_replace">使用替换</string>
<string name="scope_title">作用于标题</string>
<string name="scope_content">作用于正文</string>
<!-- string end -->
</resources>
@@ -933,5 +933,7 @@
<string name="sub_dir">子文件夹</string>
<string name="general">全局</string>
<string name="use_replace">使用替换</string>
<string name="scope_title">作用于标题</string>
<string name="scope_content">作用于正文</string>
<!-- string end -->
</resources>
@@ -930,5 +930,7 @@
<string name="sub_dir">子文件夹</string>
<string name="general">全局</string>
<string name="use_replace">使用替换</string>
<string name="scope_title">作用于标题</string>
<string name="scope_content">作用于正文</string>
<!-- string end -->
</resources>
@@ -932,5 +932,7 @@
<string name="sub_dir">子文件夹</string>
<string name="general">全局</string>
<string name="use_replace">使用替换</string>
<string name="scope_title">作用于标题</string>
<string name="scope_content">作用于正文</string>
<!-- string end -->
</resources>
+2
View File
@@ -932,5 +932,7 @@
<string name="sub_dir">子文件夹</string>
<string name="general">全局</string>
<string name="use_replace">使用替换</string>
<string name="scope_title">作用于标题</string>
<string name="scope_content">作用于正文</string>
<!-- string end -->
</resources>
+2
View File
@@ -933,5 +933,7 @@
<string name="sub_dir">Sub dir</string>
<string name="general">General</string>
<string name="use_replace">Use replace</string>
<string name="scope_title">作用于标题</string>
<string name="scope_content">作用于正文</string>
<!-- string end -->
</resources>