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

Android: Window: Honeycomb - BackgroundColor of new window not shown when new window opened in a tab

    Details

      Description

      The BackgroundColor of new window not shown when new window opened in a tab. This happens only on Android Honeycomb and works fine when tested on Froyo, Gingerbread and ICS.

      This is not a regression. The issue occurs atleast since 2.0.2

      Steps to Reproduce:
      1. Create an application with code below
      2. Launch the application
      3. Under Tab1, Click on 'Open Win3' button

      Actual: The win3 opens up under tab1 and has no background color

      Expected: The window win3 should open up with blue background color

      // this sets the background color of the master UIView (when there are no windows/tab groups on it)
      Titanium.UI.setBackgroundColor('#000');
        
      var win1 = Titanium.UI.createWindow({  
          title:'Tab 1',
          backgroundColor:'#fff'
      });
       
      var button = Ti.UI.createButton({
          title:'open win3',
          width:200,
          height:100
      });
       
      win1.add(button);
       
      var win2 = Titanium.UI.createWindow({  
          title:'Tab 2',
          backgroundColor:'#fff'
      }); 
        
      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);
         
      var win3 = Ti.UI.createWindow({
          title:'foobar',
          backgroundColor:'blue',
      });
      var button2 = Ti.UI.createButton({
          title:'back to win1',
          width:200,
          height:100,
          backgroundColor:'white'
      });
       
      win3.add(button2);
        
      button.addEventListener('click', function(){
          win3.open();
      });
       
      button2.addEventListener('click', function(){
          win3.close()
      });     
        
      // create tab group
      var tabGroup = Titanium.UI.createTabGroup();
        
      var tab1 = Titanium.UI.createTab({  
          icon:'KS_nav_views.png',
          title:'Tab 1',
          window:win1
      });
        
       
      var tab2 = Titanium.UI.createTab({  
          icon:'KS_nav_ui.png',
          title:'Tab 2',
          window:win2
      });
        
      tabGroup.addTab(tab1);  
      tabGroup.addTab(tab2);  
        
      tabGroup.open();
      

        Attachments

          Activity

            People

            • Assignee:
              pwang Ping Wang
              Reporter:
              ssekhri Satyam Sekhri
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration