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

Android: TabGroup setActiveTab not working if tabs are added with addTab method

    Details

      Description

      Steps to reproduce:
      1. Create a tabgroup and add 2 or more tabs via tabGroup.addTab method.
      2. set tab 1 as active tab via tabGroup.setActiveTab method
      3. open tabgroup.

      Expected result: tabgroup is open and active tab is #1.

      Actual Result: tabgroup is open and active tab is #0.

      Here is a code snippet:

      (function() {
      	 var tabGroup = Ti.UI.createTabGroup({
      });
      var tab0 = Titanium.UI.createTab({
          window:Ti.UI.createWindow({title: "win0"}),
          title:'Tab 0',
      });
      tabGroup.addTab(tab0);
       
      var tab1 = Titanium.UI.createTab({
          window:Ti.UI.createWindow({title: "win1"}),
          title:'Tab 1',
      });
      tabGroup.addTab(tab1);
       
      var tab2 = Titanium.UI.createTab({
          window:Ti.UI.createWindow({title: "win2"}),
          title:'Tab 2',
      });
      tabGroup.addTab(tab2);
       
      tabGroup.setActiveTab(1);
       
      tabGroup.open();
      	
      		
      })();
       
      
      

      When tabGroup is open you'll see the following log message:

      [ERROR] : TabGroupProxy: (KrollRuntimeThread) [353,353] Invalid tab index.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bijuexalture Biju pm
                Reporter:
                nadavh Nadav Hoze
                Reviewer:
                Vishal Duggal (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration