Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

tabgroup

trying to customize tabgroup background image with no hope

any idea

thank you

— asked June 24th 2010 by gmb Bi
  • background
  • customize
  • tabgroup
2 Comments
  • You'll need to be a bit more specific on what you are trying to accomplish - your current code and a bit of explanation would be helpful.

    — commented June 24th 2010 by Kevin Whinnery
  • thank you for responding Kevin
    am trying somthink like this

    var tabGroup =Titanium.UI.createTabGroup({    
    backgroundImage:"bg.png"//just to change the blck look of it 
    });
    

    then i added some tabs

    var tab = Titanium.UI.createTab({
        window:mywin,
        title:'Hello',
        icon:'myicon.png'
    });
    tabGroup.addTab(tab);
    

    if you like i can send photos of my outline file done in photoshop
    thank you .

    — commented June 24th 2010 by gmb Bi

2 Answers

  • i did build one using many png files but the performance is so poor any idea
    ???

    — answered June 24th 2010 by gmb Bi
    permalink
    1 Comment
    • to solve this i did this creating view to hold the background image
      the create fake buttons over this view with opacity to 0

      var appWin = Titanium.UI.createWindow({
          fullscreen: true , 
          backgroundColor : '#cccccc',
           height : 480.0, 
          width: 320.0
      });
      /////////
      var menu = Titanium.UI.createView({
          backgroundImage:'img/menu/1.png',
             width:320,
             height:62,
          left:0,
          bottom:0
      });
          var bo1 = Titanium.UI.createView({
                id:"1",
                 width:64,
              height:62,
              right:0,
              bottom:0
          });
          //
          var bo2 = Titanium.UI.createView({
                id:"2",     
                 width:64,
              height:62,
              right:bo1.right+64,
              bottom:0
          });
          var bo3 = Titanium.UI.createView({
                id:"3",     
                 width:64,
              height:62,
              right:bo2.right+64,
              bottom:0
          });
          var bo4 = Titanium.UI.createView({
                id:"4",
                 width:64,
              height:62,
              right:bo3.right+64,
              bottom:0
          });
          var bo5 = Titanium.UI.createView({
                id:"5",    
                 width:64,
              height:62,
              right:bo4.right+64,
              bottom:0
          });
      
          //
      menu.add(bo1);
      menu.add(bo2);
      menu.add(bo3);
      menu.add(bo4);
      menu.add(bo5);
      
      appWin.add(menu);
      //
      function mainMenu(obj){
      menu.backgroundImage='img/menu/'+obj.source.id+".png"    
      }
      bo1.addEventListener('click',mainMenu);
      bo2.addEventListener('click',mainMenu)
      bo3.addEventListener('click',mainMenu)
      bo4.addEventListener('click',mainMenu)
      bo5.addEventListener('click',mainMenu)
      
      /////////////
      appWin.open()
      

      — commented June 24th 2010 by gmb Bi
  • any idea !!

    — answered June 25th 2010 by gmb Bi
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.