You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When extending CropImageActivity, the AlertDialog is cancellable if touched outside. If the user accidentally touches outside the dialog, it is left into a black CropImageActivity and the dialog never comes back. If trying to override the method after my CropImageActivity extension's onCreate:
override fun showImageSourceDialog(openSource: (Source) -> Unit) {
AlertDialog.Builder(this)
.setTitle("sample title")
.setCancellable(false) // Does not work :(
.setItems(
arrayOf(
getString(R.string.pick_image_camera),
getString(R.string.pick_image_gallery),
)
) { _, position -> openSource(if (position == 0) Source.CAMERA else Source.GALLERY) }
.show()
}
...no custom title is assigned, plus the dialog is still cancellable even after told otherwise. The debugger never enters this method.
To Reproduce
Steps to reproduce the behavior:
Create a new CropImageActivity just as shown in the documentation.
Touch outside the dialog once it appears.
Expected behavior
The dialog should not be cancelled on touch outside.
Media
Please add screenshots and/or screen recordings to help explain your problem.
We cannot help without more information
Smartphone (please complete the following information):
Device: Huawei P40 Pro, Nexus 5 (emulated).
OS: Android 10, Android 12 respectively.
The text was updated successfully, but these errors were encountered:
Describe the bug
When extending
CropImageActivity
, theAlertDialog
is cancellable if touched outside. If the user accidentally touches outside the dialog, it is left into a blackCropImageActivity
and the dialog never comes back. If trying to override the method after myCropImageActivity
extension'sonCreate
:...no custom title is assigned, plus the dialog is still cancellable even after told otherwise. The debugger never enters this method.
To Reproduce
Steps to reproduce the behavior:
CropImageActivity
just as shown in the documentation.Expected behavior
The dialog should not be cancelled on touch outside.
Media
Please add screenshots and/or screen recordings to help explain your problem.
We cannot help without more information
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: