mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
simplify some dialogs
This commit is contained in:
parent
a7d1ebaf5e
commit
774f9d691b
7 changed files with 7 additions and 7 deletions
|
@ -22,7 +22,7 @@ class ChangeSortingDialog(val activity: Activity, val isDirectorySorting: Boolea
|
|||
view = LayoutInflater.from(activity).inflate(R.layout.dialog_change_sorting, null)
|
||||
|
||||
val dialog = AlertDialog.Builder(activity)
|
||||
.setTitle(activity.resources.getString(R.string.sort_by))
|
||||
.setTitle(R.string.sort_by)
|
||||
.setView(view)
|
||||
.setPositiveButton(R.string.ok, this)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
|
|
|
@ -33,7 +33,7 @@ class CopyDialog(val activity: SimpleActivity, val files: ArrayList<File>, val c
|
|||
}
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
.setTitle(activity.resources.getString(if (files.size == 1) R.string.copy_item else R.string.copy_items))
|
||||
.setTitle(if (files.size == 1) R.string.copy_item else R.string.copy_items)
|
||||
.setView(view)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
|
|
|
@ -22,7 +22,7 @@ class PickAlbumDialog(val activity: SimpleActivity, val callback: (path: String)
|
|||
directoriesGrid = view.directories_grid
|
||||
|
||||
dialog = AlertDialog.Builder(activity)
|
||||
.setTitle(activity.resources.getString(R.string.select_destination))
|
||||
.setTitle(R.string.select_destination)
|
||||
.setView(view)
|
||||
.setNeutralButton(R.string.other_folder, { dialogInterface, i -> showOtherFolder() })
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
|
|
|
@ -19,7 +19,7 @@ class RenameDirectoryDialog(val activity: SimpleActivity, val dir: File, val cal
|
|||
view.directory_path.text = "${activity.humanizePath(dir.parent)}/"
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
.setTitle(activity.resources.getString(R.string.rename_folder))
|
||||
.setTitle(R.string.rename_folder)
|
||||
.setView(view)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
|
|
|
@ -28,7 +28,7 @@ class RenameFileDialog(val activity: SimpleActivity, val file: File, val callbac
|
|||
view.file_path.text = "${activity.humanizePath(file.parent)}/"
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
.setTitle(activity.resources.getString(R.string.rename_file))
|
||||
.setTitle(R.string.rename_file)
|
||||
.setView(view)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
|
|
|
@ -69,7 +69,7 @@ class ResizeDialog(val activity: SimpleActivity, val size: Point, val callback:
|
|||
})
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
.setTitle(activity.resources.getString(R.string.resize_and_save))
|
||||
.setTitle(R.string.resize_and_save)
|
||||
.setView(view)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
|
|
|
@ -43,7 +43,7 @@ class SaveAsDialog(val activity: Activity, val path: String, val callback: (save
|
|||
}
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
.setTitle(activity.resources.getString(R.string.save_as))
|
||||
.setTitle(R.string.save_as)
|
||||
.setView(view)
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setNegativeButton(R.string.cancel, null)
|
||||
|
|
Loading…
Reference in a new issue