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

Android: TabGroup focus event is not fired when setActiveTab is called on the first tab

    Details

      Description

      1. Run this code:

      var win1 = Ti.UI.createWindow({
          title: 'Win 1'
      });
         
      var tab1 = Ti.UI.createTab({  
          icon: 'KS_nav_ui.png',
          title: 'Tab 1',
          window: win1
      });
         
      var win2 = Ti.UI.createWindow({
          title: 'Win 2'
      });
         
      var tab2 = Ti.UI.createTab({  
          icon: 'KS_nav_views.png',
          title: 'Tab 2',
          window: win2
      });
        
      var tabGroup = Ti.UI.createTabGroup({
            
      });
                 
      tabGroup.addTab(tab1);
      tabGroup.addTab(tab2);
      tabGroup.setActiveTab(tab1);
      tabGroup.open();
      tabGroup.addEventListener('focus', function(e) {
          Ti.API.info('--------------------Focus tab index: ' + e.index);
      });
      

      2. Look at the log for the focus tab message.

      Expected behavior:
      Log message should be printed.

      Actual behavior:
      Log is not printed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                hpham Hieu Pham
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-14289
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration