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

Android: Tabgroup.animate not working on Android 2.2 with Ti sdk 1.7.0

    Details

      Description

      Copy the following code in app.js

      /*
      var tabGroup = Ti.UI.createTabGroup({bottom:-50});
      tabGroup.addTab(Ti.UI.createTab({
          title: 'Tab 1',
          window: Ti.UI.createWindow({ backgroundColor: 'red', url: 'sub.js' })
      }));
      tabGroup.addTab(Ti.UI.createTab({
          title: 'Tab 2',
          window: Ti.UI.createWindow({ backgroundColor: 'blue', url: 'sub.js' })
      }));
      tabGroup.open();
      */
       
      // this sets the background color of the master 
      //UIView (when there are no windows/tab groups on it)
      Titanium.UI.setBackgroundColor('#000');
       
      // create tab group
      var tabGroup = Titanium.UI.createTabGroup({bottom:-50});
       
      //
      // create base UI tab and root window
      //
      var win1 = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff'
      });
      var tab1 = Titanium.UI.createTab({  
          icon:'KS_nav_views.png',
          title:'Tab 1',
          window:win1
      });
       
      var toggleBtn = Titanium.UI.createButton({
          top:40,
          height:35,
          width:150,
          title:'toggle tab bar'
      });
       
      win1.add(toggleBtn);
      toggleBtn.addEventListener('click', function(e){
       
          if (tabGroup.tabBarVisible == true) {
              tabGroup.animate({bottom:-50,duration:500});
              tabGroup.tabBarVisible = false;
          } else {
              tabGroup.animate({bottom:0,duration:500});
              tabGroup.tabBarVisible = true;
          }
      });
       
      //
      // create controls tab and root window
      //
      var win2 = Titanium.UI.createWindow({  
          title:'Tab 2',
          backgroundColor:'#fff'
      });
      var tab2 = Titanium.UI.createTab({  
          icon:'KS_nav_ui.png',
          title:'Tab 2',
          window:win2
      });
       
      var label2 = Titanium.UI.createLabel({
          color:'#999',
          text:'I am Window 2',
          font:{fontSize:20,fontFamily:'Helvetica Neue'},
          textAlign:'center',
          width:'auto'
      });
       
      win2.add(label2);
       
       
       
      //
      //  add tabs
      //
      tabGroup.addTab(tab1);  
      tabGroup.addTab(tab2);  
       
       
      // open tab group
      tabGroup.open();
      

      The application works fine on 1.6.2

      Associated Helpdesk Ticket

      http://appc.me/c/APP-757696

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                anagesh Anirudh Nagesh
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

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

                    Git Source Code