Titanium Community Questions & Answer Archive

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

Back button not fire the second and third window in tab

Hi all,

The real problem of my App is that I want to return to the previous window when I press the Back button, but the BAck button does not perform well.

There are 2 tabs: fristTab and secondTab in the tabGroup. In the secondTab, there are 3 window: firstWindow, secondWindow, and thirdWindow. I have add event to back button in all windows. As a result, only the firstWindow that the back button works. However, the Back Button on secondWindow and thirdWindow do not perform as what I expect. When I press the Back Button, it does not do anything as if I don press the Button.

Here is the code in firstWindow, but other 2 are the same.

firstWindow.addEventListener('android:back', function() {
            var dlg = Ti.UI.createAlertDialog({ message : 'Exit?',
 buttonNames : ['OK','Cancel']});
            dlg.addEventListener("click", function(e) {
                if (e.index == 0) {
— asked September 1st 2010 by Sreyleap Lay
  • backbutton
  • button
  • event
  • tab
  • tabgroup

0 Answers

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.