From f21ff7dba87bcda6cd41f4704fc9b5219f4bc4b5 Mon Sep 17 00:00:00 2001 From: Super12138 <70494801+Super12138@users.noreply.github.com> Date: Sat, 13 Apr 2024 09:39:57 +0800 Subject: [PATCH] Make dialog uncancelable --- .../main/kotlin/cn/super12138/todo/views/todo/ToDoFragment.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/kotlin/cn/super12138/todo/views/todo/ToDoFragment.kt b/app/src/main/kotlin/cn/super12138/todo/views/todo/ToDoFragment.kt index 121c771..f6c42f4 100644 --- a/app/src/main/kotlin/cn/super12138/todo/views/todo/ToDoFragment.kt +++ b/app/src/main/kotlin/cn/super12138/todo/views/todo/ToDoFragment.kt @@ -84,6 +84,7 @@ class ToDoFragment : Fragment() { .setView(toDoDialogBinding.root) .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel, null) + .setCancelable(false) .show() dialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {