Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26174

Android: add setCancelable method on Ti.UI.AlertDialog

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 7.5.0
    • Component/s: Android
    • Labels:
    • Environment:

      Android

      Description

      When I use the following code, I want to prevent the Android back button from dismissing the dialog, since I want to detect if a user clicked or canceled the dialog. When the dialog is canceled/dismissed via the Android back button, no event is triggered.

      By implementing the setCancelable method, this could be solved. See https://developer.android.com/reference/android/app/AlertDialog.Builder#setCancelable(boolean)

          var dialog = Ti.UI.createAlertDialog({
              message: pMessage,
              ok: 'OK',
              title: 'Title',
              canceledOnTouchOutside: false,
              persistent: true
          });
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ybanev Yordan Banev
                Reporter:
                menno Menno Juistdit
                Reviewer:
                Gary Mathews
                Tester:
                Lokesh Choudhary
              • Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Source Code