pull/32/head
kunfei 5 years ago
parent 1b8f79a66c
commit 9d5822cff4
  1. 6
      app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfFragment.kt

@ -1,5 +1,6 @@
package io.legado.app.ui.main.bookshelf package io.legado.app.ui.main.bookshelf
import android.annotation.SuppressLint
import android.os.Bundle import android.os.Bundle
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
@ -130,10 +131,10 @@ class BookshelfFragment : VMBaseFragment<BookshelfViewModel>(R.layout.fragment_b
return false return false
} }
@SuppressLint("InflateParams")
private fun showGroupInputDialog() { private fun showGroupInputDialog() {
alert(title = "新建分组") { alert(title = "新建分组") {
var editText: EditText? = null var editText: EditText? = null
customView { customView {
layoutInflater.inflate(R.layout.dialog_edittext, null).apply { layoutInflater.inflate(R.layout.dialog_edittext, null).apply {
editText = edit_view.apply { editText = edit_view.apply {
@ -142,13 +143,10 @@ class BookshelfFragment : VMBaseFragment<BookshelfViewModel>(R.layout.fragment_b
} }
} }
} }
yesButton { yesButton {
viewModel.saveBookGroup(editText?.text?.toString()) viewModel.saveBookGroup(editText?.text?.toString())
} }
noButton() noButton()
}.show().applyTint().requestInputMethod() }.show().applyTint().requestInputMethod()
} }

Loading…
Cancel
Save