Search code examples
titaniumappceleratortitanium-mobile

Titanium: Tab's icon image not working


I am trying to change icons of my tab group's tab, but it doesn't show the image.

For iOS

I've used below code:

var win1 = Titanium.UI.createWindow
({  
    url:'Tab1.js'
});

var tab1 = Titanium.UI.createTab
({  
      icon:'footer_contactus_hover.png',
      window:win1
});

// create controls tab and root window
var win2 = Titanium.UI.createWindow
({        
    url:'Tab2.js'
});

var tab2 = Titanium.UI.createTab
({  
    icon:'footer_search.png',
    window:win2
});

I am having 4 tabs. Image's size is 81x51 . It shows me only blue rectangle instead of original image.

Also I've tried <property name="ti.android.fastdev" type="bool">false</property>

Whats wrong with the code ?


Solution

  • Solved by making images Transparent.

    Also found : - Icon needs to be fileld with a color for visible pixels and transparent for the invisible part. The os will apply the blue glowing stuff, so if icon does not have transparent pixels you will only see a rectangle.