Skip to content

Commit e050635

Browse files
authored
Allow closing the dialog by clicking outside of it
1 parent 2fdd2cc commit e050635

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/pro/dialogs/NewChecklistItemDialog.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ import androidx.appcompat.app.AlertDialog
1212
import com.simplemobiletools.commons.extensions.*
1313
import com.simplemobiletools.notes.pro.R
1414
import com.simplemobiletools.notes.pro.extensions.config
15-
import kotlinx.android.synthetic.main.dialog_new_checklist_item.view.add_item
16-
import kotlinx.android.synthetic.main.dialog_new_checklist_item.view.checklist_holder
17-
import kotlinx.android.synthetic.main.dialog_new_checklist_item.view.dialog_holder
18-
import kotlinx.android.synthetic.main.item_add_checklist.view.title_edit_text
15+
import kotlinx.android.synthetic.main.dialog_new_checklist_item.view.*
16+
import kotlinx.android.synthetic.main.item_add_checklist.view.*
1917

2018
class NewChecklistItemDialog(val activity: Activity, callback: (titles: ArrayList<String>) -> Unit) {
2119
private val titles = mutableListOf<EditText>()
@@ -33,7 +31,7 @@ class NewChecklistItemDialog(val activity: Activity, callback: (titles: ArrayLis
3331
.setPositiveButton(R.string.ok, null)
3432
.setNegativeButton(R.string.cancel, null)
3533
.create().apply {
36-
activity.setupDialogStuff(view, this, R.string.add_new_checklist_items, cancelOnTouchOutside = false) {
34+
activity.setupDialogStuff(view, this, R.string.add_new_checklist_items) {
3735
activity.showKeyboard(titles.first())
3836
window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
3937
getButton(BUTTON_POSITIVE).setOnClickListener {

0 commit comments

Comments
 (0)