2

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 ?

Maulik
  • 19,348
  • 14
  • 82
  • 137

2 Answers2

1

Assuming that your image does exist at the locations specified my first guess would be that your images are not created properly so that when the get masked all you see is a blue rectangle. I would suggest grabbing some other icon images from http://glyphish.com/ to see if it may be that your images are not created properly (I do not have any affiliation with that except I have used their icons in my projects and they are top-notch).

Also you may want to check out the Human Interface Guidelines as it sets forth specified sizes.

jdwfly
  • 402
  • 2
  • 7
1

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.

Maulik
  • 19,348
  • 14
  • 82
  • 137