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

pull/1606/head
kunfei 3 years ago
parent 2d07447dfa
commit 011f46fb4c
  1. 4
      app/src/main/java/io/legado/app/ui/replace/edit/ReplaceEditActivity.kt
  2. 22
      app/src/main/res/layout/activity_replace_edit.xml
  3. 2
      app/src/main/res/values-es-rES/strings.xml
  4. 2
      app/src/main/res/values-ja-rJP/strings.xml
  5. 2
      app/src/main/res/values-pt-rBR/strings.xml
  6. 2
      app/src/main/res/values-zh-rHK/strings.xml
  7. 2
      app/src/main/res/values-zh-rTW/strings.xml
  8. 2
      app/src/main/res/values-zh/strings.xml
  9. 2
      app/src/main/res/values/strings.xml

@ -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>

@ -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>

@ -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>

Loading…
Cancel
Save