title bar
This question is related to the following one: http://developer.appcelerator.com/question/85961/tabgroup-background-color
The problem was that I needed to style a tabGroup, but since that's not possible, I recreated the tabGroup with images and buttons.
The problem that I now have is that I don't have a title bar, and opening it as a modal window isn't a sollution.
I'll show it with some code, this is my app.js
Titanium.UI.setBackgroundColor('#3c3c3c');
var mainWindow = Ti.UI.createWindow({
backgroundImage: 'assets/bgPattern.png',
url: 'main.js'
});
mainWindow.open();
Nothing special, just a normal window with a background image.
This is my main.js: http://pastie.org/1348163
I just created a window and an image (the tabGroup).
But now I don't have a title bar, i can open the window in modal mode, but then i lose my images (even with a window height).
So i'm a little bit stuck here, I hope somebody can help me out.
EDIT: i'm using Titanium 1.4.3
4 Answers
-
http://developer.appcelerator.com/question/1011/how-do-i-add-a-title-barnavbar-to-the-main-window
I found this solution before, but is this a good one?
It looks like a dirty workaround. -
Wouter
Try setting the fullscreen:false or navBarHidden:false properties on the window.
Cheers
-
EDIT: double post.
-
So I went with this solution (http://developer.appcelerator.com/question/1011/how-do-i-add-a-title-barnavbar-to-the-main-window), but for some reason I can't give the title bar an image:
var mainWindow = Ti.UI.createWindow({ url: 'main.js', barImage: "assets/titleBarBg.png", title: "main", tabBarHidden: true });
It only works when I manually do it in the open event of my main.js