pull/473/head
gedoor 4 years ago
parent b21c42be82
commit 7e1d5162a7
  1. 8
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditAdapter.kt
  2. 9
      app/src/main/java/io/legado/app/ui/replace/edit/ReplaceEditActivity.kt

@ -18,11 +18,9 @@ class BookSourceEditAdapter : RecyclerView.Adapter<BookSourceEditAdapter.MyViewH
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder {
return MyViewHolder(
LayoutInflater.from(
parent.context
).inflate(R.layout.item_source_edit, parent, false)
)
val view = LayoutInflater.from(parent.context)
.inflate(R.layout.item_source_edit, parent, false)
return MyViewHolder(view)
}
override fun onBindViewHolder(holder: MyViewHolder, position: Int) {

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

Loading…
Cancel
Save