|
|
@ -135,19 +135,14 @@ class ReplaceEditActivity : |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun showHelpDialog() { |
|
|
|
private fun showHelpDialog() { |
|
|
|
val items = arrayListOf("替换净化教程", "正则教程") |
|
|
|
val items = arrayListOf("正则教程") |
|
|
|
selector(getString(R.string.help), items) { _, index -> |
|
|
|
selector(getString(R.string.help), items) { _, index -> |
|
|
|
when (index) { |
|
|
|
when (index) { |
|
|
|
0 -> showReplaceHelp() |
|
|
|
0 -> showRegexHelp() |
|
|
|
1 -> showRegexHelp() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun showReplaceHelp() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun showRegexHelp() { |
|
|
|
private fun showRegexHelp() { |
|
|
|
val mdText = String(assets.open("help/regex.md").readBytes()) |
|
|
|
val mdText = String(assets.open("help/regex.md").readBytes()) |
|
|
|
TextDialog.show(supportFragmentManager, mdText, TextDialog.MD) |
|
|
|
TextDialog.show(supportFragmentManager, mdText, TextDialog.MD) |
|
|
|