Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18376] Android: Add setCanceledOnTouchOutside, setCancelable methods on Ti.UI.AlertDialog.

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2018-07-25T06:27:38.000+0000
Affected Version/sRelease 3.4.1, Release 3.5.0
Fix Version/sn/a
ComponentsAndroid
LabelsDialogs
ReporterTopbit Du
AssigneeYordan Banev
Created2015-01-08T03:05:14.000+0000
Updated2018-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?

Comments

  1. Patrick Mounteney 2016-10-09

    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
  2. Yordan Banev 2018-07-02

  3. Hans Knöchel 2018-07-25

    Added as part of TIMOB-26174.
  4. Eric Merriman 2018-08-06

    Closing as a duplicate. If this is in error, please reopen.

JSON Source