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 { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MyViewHolder {
return MyViewHolder( val view = LayoutInflater.from(parent.context)
LayoutInflater.from( .inflate(R.layout.item_source_edit, parent, false)
parent.context return MyViewHolder(view)
).inflate(R.layout.item_source_edit, parent, false)
)
} }
override fun onBindViewHolder(holder: MyViewHolder, position: Int) { override fun onBindViewHolder(holder: MyViewHolder, position: Int) {

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

Loading…
Cancel
Save