Titanium Community Questions & Answer Archive

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

win.titleImage doesn't fit nav bar

hello

i am using a 320x44 png to put in the navbar with the following code:

Ti.UI.currentWindow.titleImage = 'path/to/my/image';

the image appears, but does not fit the navbar; leaving a 3-4 pixel gap to the left, and a couple on the right.

anyone else found this, and have fixes for it?

cheers

vince

— asked April 16th 2010 by Vince Lee
  • iphone
  • mobile
0 Comments

5 Answers

  • so, is there no way the whole navbar can be covered completely with an image?

    — answered July 15th 2010 by sudhi seshachala
    permalink
    1 Comment
    • Try this.

      win.barImage = "images/navbar.png";

      — commented December 10th 2010 by Henrik Samuelsson
  • I'm having the same problem. A solution for this is to set the barImage as the background of the title bar, and the titleImage with the image you want. In fact, setting both properties to the same image works too. Ok, it's not pretty, but it solves the problem temporarily until we find a real solution. ;)

    — answered December 29th 2011 by José Júnior
    permalink
    1 Comment
    • Perfect, Thanks.

      — commented January 3rd 2012 by Patty Mapes
  • for the title image the appropriate image size should be 24 x 24…

    — answered April 16th 2010 by Satta Ravi
    permalink
    0 Comments
  • thanks for your reply - ah right, so you can't replace the nav bar (the area at the top with the window's title in) completely with a graphic?

    — answered April 16th 2010 by Vince Lee
    permalink
    0 Comments
  • Not using the standard nav bar, no - you could simply use a view as a header, which could have a background image styled any way you'd like. If you have sub-windows on the stack, they would need the custom header as well. This is just a function of how the native nav bar works.

    — answered July 15th 2010 by Kevin Whinnery
    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.