[TIMOB-18376] Android: Add setCanceledOnTouchOutside, setCancelable methods on Ti.UI.AlertDialog.
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | None |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2018-07-25T06:27:38.000+0000 |
| Affected Version/s | Release 3.4.1, Release 3.5.0 |
| Fix Version/s | n/a |
| Components | Android |
| Labels | Dialogs |
| Reporter | Topbit Du |
| Assignee | Yordan Banev |
| Created | 2015-01-08T03:05:14.000+0000 |
| Updated | 2018-08-06T17:41:12.000+0000 |
Description
Android 4.0 Dialog gets canceled when touched outside of dialog window. But Android 2.3.3 is on the opposite. I tried the following codes but they don't help:
var dialog = Ti.UI.createAlertDialog({
message: 'Message Body',
buttonNames: [ 'Cancel', 'OK' ],
cancel: 0,
ok: 1,
central: 2,
title: 'Message Title',
canceledOnTouchOutside: false
});
dialog.setCanceledOnTouchOutside(false);
dialog.addEventListener('click', self.onDialogClicked);
Is it possible to make the developer control more dialog behaviours?
While the 'canceledOnTouchOutside' property is in the documentation for Ti.UI.AlertDialog, I found setting it to false does not inhibit a tap in it's parent window background from dismissing the alert. Using Titanium SDK 5.5.1.GA
Added as part of TIMOB-26174.
Closing as a duplicate. If this is in error, please reopen.