Titanium: Tab's icon image not working

You must Login before you can answer or comment on any questions.

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 ?

— asked 1 year ago by maulik S
1 Comment
  • first of all fastdev is only for android..

    — commented 1 year ago by Mitul Bhalia

4 Answers

Accepted Answer

Make your images transparent . It will work.

— answered 1 year ago by mathew orleans
answer permalink
2 Comments
  • I've downloaded images from http://glyphish.com that also work... but my images are not transparent... Is there any way to display images those are not transparent ?

    — commented 1 year ago by maulik S

  • You have to photoshop then ..

    — commented 1 year ago by mathew orleans

Try to set default tab images for demo, may be your size is more than it fits in to tabs.

pathing was my issue. I had to set it to /images/<imagename>.png for the icon to display.

Your Answer

Think you can help? Login to answer this question!