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

Android: TabGroup - tabGroup.activeTab returns null instead of object

    Details

      Description

      tabGroup.activeTab returns null instead of object.
      This is regression since the issue does not occur on 2.1.2 GA.

      Steps to reproduce:
      1. Create an app using the code below.
      2. Launch the app. and check logs.

      Expected:
      Activetab should return object.

      Actual:
      Activetab returns null.

       
      var win1 = Ti.UI.createWindow({
          title: 'Win 1'
      });
       
      var button = Ti.UI.createButton({
          color: '#000',
          style: Ti.UI.iPhone.SystemButtonStyle.BORDERED,
          title: 'Set Active Tab 1'
      });
       
      button.addEventListener('click', function(e) {
          tabGroup.setActiveTab(1);
          Ti.API.info('****************** activeTab: ' + tabGroup.activeTab);
      });
       
      win1.add(button);
       
      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.open();
       
      Ti.API.info('********************* activeTab: ' + tabGroup.activeTab);

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration