Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Android: back button in a dialog

I'm opening a dialog window on startup of my application. When the user clicks on ok, this will load the main tabGroup. However, if the user uses the back button it will close the dialog.

Is there any way that I can detect that the user closed the dialog box ? It seems that the "click" event is not fired in this case.

— asked November 20th 2010 by Etienne Bernard
  • android
  • back
  • dialog
0 Comments

1 Answer

  • Hi Etienne

    Yes, you can configure the android back button by using:

    win.addEventListener('android:back', function(e) {
        Ti.API.Info("Pressing Back Will Not Close The Activity/Window");
    });
    
    — answered November 20th 2010 by Paul Dowsett
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.