From c60022da56e01dd142c38cb39fccf96af267ce9b Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 29 Jan 2021 22:46:53 +0800 Subject: [PATCH] edit ReplaceRuleActivity.kt --- app/src/main/assets/help/replaceRuleHelp.md | 6 ++++++ .../java/io/legado/app/ui/replace/ReplaceRuleActivity.kt | 7 +++++++ app/src/main/res/menu/replace_rule.xml | 6 ++++++ 3 files changed, 19 insertions(+) create mode 100644 app/src/main/assets/help/replaceRuleHelp.md diff --git a/app/src/main/assets/help/replaceRuleHelp.md b/app/src/main/assets/help/replaceRuleHelp.md new file mode 100644 index 000000000..063c8d3a3 --- /dev/null +++ b/app/src/main/assets/help/replaceRuleHelp.md @@ -0,0 +1,6 @@ +# 替换管理界面帮助 + +* 替换规则是用来替换正文内容的一种规则 + * 菜单可以新建和导入规则 + * 可以拖动排序 + * 可以选择操作 \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt b/app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt index d3965882e..6563f3a5b 100644 --- a/app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt +++ b/app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt @@ -32,6 +32,7 @@ import io.legado.app.ui.filepicker.FilePickerDialog import io.legado.app.ui.qrcode.QrCodeActivity import io.legado.app.ui.replace.edit.ReplaceEditActivity import io.legado.app.ui.widget.SelectActionBar +import io.legado.app.ui.widget.dialog.TextDialog import io.legado.app.ui.widget.recycler.DragSelectTouchHelper import io.legado.app.ui.widget.recycler.ItemTouchCallback import io.legado.app.ui.widget.recycler.VerticalDivider @@ -190,6 +191,7 @@ class ReplaceRuleActivity : VMBaseActivity FilePicker .selectFile(this, importRequestCode, allowExtensions = arrayOf("txt", "json")) R.id.menu_import_source_qr -> startActivityForResult(importRequestCodeQr) + R.id.menu_help -> showHelp() else -> if (item.groupId == R.id.replace_group) { searchView.setQuery("group:${item.title}", true) } @@ -243,6 +245,11 @@ class ReplaceRuleActivity : VMBaseActivity + +