Skip to content

Commit 75405a1

Browse files
committed
make sure the dialogs are cancelable by clicking outside
1 parent ecf4d9e commit 75405a1

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/CopyDialog.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class CopyDialog(val activity: SimpleActivity, val files: ArrayList<File>, val c
4646
.setNegativeButton(R.string.cancel, null)
4747
.create().apply {
4848
window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
49+
setCanceledOnTouchOutside(true)
4950
show()
5051
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener({
5152
if (destinationPath == context.resources.getString(R.string.select_destination) || destinationPath.isEmpty()) {

app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/CreateNewItemDialog.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class CreateNewItemDialog(val context: Context, val path: String, val listener:
2323
.setNegativeButton(R.string.cancel, null)
2424
.create().apply {
2525
window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
26+
setCanceledOnTouchOutside(true)
2627
show()
2728
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(View.OnClickListener {
2829
val name = view.item_name.value

app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/RenameItemDialog.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class RenameItemDialog(val context: Context, val item: FileDirItem, val listener
2626
.setNegativeButton(R.string.cancel, null)
2727
.create().apply {
2828
window!!.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
29+
setCanceledOnTouchOutside(true)
2930
show()
3031
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener({
3132
val newName = view.item_name.value

0 commit comments

Comments
 (0)