From cae33b41b6769f75623c3798c2a440cb852e0ae5 Mon Sep 17 00:00:00 2001 From: Gino Miceli <228050+gino-m@users.noreply.github.com> Date: Mon, 11 Sep 2023 07:02:57 +0300 Subject: [PATCH] Disable tap outside offline area download dialog (#1864) * Disable tap outside download dialog * Run ktfmtFormat --------- Co-authored-by: Shobhit Agarwal --- .../selector/DownloadProgressDialogFragment.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ground/src/main/java/com/google/android/ground/ui/offlinebasemap/selector/DownloadProgressDialogFragment.kt b/ground/src/main/java/com/google/android/ground/ui/offlinebasemap/selector/DownloadProgressDialogFragment.kt index ae3713f525..ff322a4ac7 100644 --- a/ground/src/main/java/com/google/android/ground/ui/offlinebasemap/selector/DownloadProgressDialogFragment.kt +++ b/ground/src/main/java/com/google/android/ground/ui/offlinebasemap/selector/DownloadProgressDialogFragment.kt @@ -32,12 +32,15 @@ class DownloadProgressDialogFragment : Hilt_DownloadProgressDialogFragment() { val binding = DownloadProgressDialogFragBinding.inflate(inflater) binding.lifecycleOwner = this binding.viewModel = getViewModel(OfflineAreaSelectorViewModel::class.java) - return AlertDialog.Builder(requireActivity()) - .setTitle("Download progress") - .setMessage(getString(R.string.offline_map_imagery_download_progress_dialog_message)) - .setView(binding.root) - .setCancelable(false) - .create() + val dialog = + AlertDialog.Builder(requireActivity()) + .setTitle("Download progress") + .setMessage(getString(R.string.offline_map_imagery_download_progress_dialog_message)) + .setView(binding.root) + .setCancelable(false) + .create() + dialog.setCanceledOnTouchOutside(false) + return dialog } fun setVisibility(childFragmentManager: FragmentManager, newVisibility: Boolean) {