From 431acaf092d3af83efb02609bea3edb5bc5984fc Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 26 Dec 2016 13:14:54 +0100 Subject: [PATCH] remove the explicit setView call at dialogs --- .../com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt | 1 - .../kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt | 1 - .../com/simplemobiletools/gallery/dialogs/PickAlbumDialog.kt | 1 - .../simplemobiletools/gallery/dialogs/RenameDirectoryDialog.kt | 1 - .../com/simplemobiletools/gallery/dialogs/RenameFileDialog.kt | 1 - .../kotlin/com/simplemobiletools/gallery/dialogs/ResizeDialog.kt | 1 - .../kotlin/com/simplemobiletools/gallery/dialogs/SaveAsDialog.kt | 1 - 7 files changed, 7 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt index 8d998203e..a40b050cb 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt @@ -23,7 +23,6 @@ class ChangeSortingDialog(val activity: SimpleActivity, val isDirectorySorting: view = LayoutInflater.from(activity).inflate(R.layout.dialog_change_sorting, null) as ViewGroup AlertDialog.Builder(activity) - .setView(view) .setPositiveButton(R.string.ok, this) .setNegativeButton(R.string.cancel, null) .create().apply { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt index 1c296f519..8a3e11e49 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt @@ -33,7 +33,6 @@ class CopyDialog(val activity: SimpleActivity, val files: ArrayList, val c } AlertDialog.Builder(activity) - .setView(view) .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel, null) .create().apply { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickAlbumDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickAlbumDialog.kt index 731328add..aefeb107d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickAlbumDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickAlbumDialog.kt @@ -23,7 +23,6 @@ class PickAlbumDialog(val activity: SimpleActivity, val callback: (path: String) directoriesGrid = view.directories_grid AlertDialog.Builder(activity) - .setView(view) .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel, null) .setNeutralButton(R.string.other_folder, { dialogInterface, i -> showOtherFolder() }) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/RenameDirectoryDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/RenameDirectoryDialog.kt index 282d61484..fae3eb0c7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/RenameDirectoryDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/RenameDirectoryDialog.kt @@ -19,7 +19,6 @@ class RenameDirectoryDialog(val activity: SimpleActivity, val dir: File, val cal view.directory_path.text = "${activity.humanizePath(dir.parent)}/" AlertDialog.Builder(activity) - .setView(view) .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel, null) .create().apply { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/RenameFileDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/RenameFileDialog.kt index 297b6afd6..88c30f88d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/RenameFileDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/RenameFileDialog.kt @@ -29,7 +29,6 @@ class RenameFileDialog(val activity: SimpleActivity, val file: File, val callbac view.file_path.text = "${activity.humanizePath(file.parent)}/" AlertDialog.Builder(activity) - .setView(view) .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel, null) .create().apply { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ResizeDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ResizeDialog.kt index 533f0056f..0d339dcc8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ResizeDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ResizeDialog.kt @@ -70,7 +70,6 @@ class ResizeDialog(val activity: SimpleActivity, val size: Point, val callback: }) AlertDialog.Builder(activity) - .setView(view) .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel, null) .create().apply { diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SaveAsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SaveAsDialog.kt index 844f11204..46051c573 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SaveAsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/SaveAsDialog.kt @@ -43,7 +43,6 @@ class SaveAsDialog(val activity: Activity, val path: String, val callback: (save } AlertDialog.Builder(activity) - .setView(view) .setPositiveButton(R.string.ok, null) .setNegativeButton(R.string.cancel, null) .create().apply {