changing title in new windows
hi,
in app.js, i open a new window. i want to set the title and backgroundColor. but when i have both settings inside createWindow(), title gets ignored.
var home = Ti.UI.createWindow({
width:"auto",
height:"auto",
backgroundColor: "#ccc",
title: "Viessmann EffizienzPlus",
url: "pages/home.js",
exitOnClose: true
});
home.open();
is there a solution to this?
4 Answers
-
Accepted Answer
Marcin
Please see ticket #2361 regarding the window title issue and some ways to avoid it.
-
if you use the open() attribute the navBar will not overwrited.
If you are in a tabView try whitTitanium.UI.currentTab.open(home);
-
marcin
You can workaround this issue by setting the navBarHidden:false property.
There is an added advantage of using navBarHidden:true/false on subsequent windows, as it makes that window "heavyweight", and so closing the window using the android back button will simply close the window and not the whole app.
-
@hal:
i came across the concept of heavyweight windows as well. but right now i'm on the root window, so i want it to close when hitting back.
but as with my code snippet, when deletingbackgroundColor: "#ccc",
the title attribute is recognized and the window has the appropriate name.
@stefano:
unfortunatly i'm not in a tabView…thanks for answering tho… :)