Ti.UI.createWindow - But No Bar Or Tabset :(
Hi all,
I have my home.js view which is loaded when the app fires up. On this page I have a button which when clicked opens a new window with some rss imported.
My issue is when you click the button the window opens but there is no header bar or tab navigation at the bottom.
My Code is as follows:
var w = Titanium.UI.currentWindow;
var menu = Ti.UI.createView({zIndex:100, backgroundColor:'#000', barColor: "#000", width:300, height:375, top:5, left:5, right:5, botttom:5, borderRadius: 10})
// Latest Container
var productsContainer = Ti.UI.createView({backgroundColor:'red', height:215, width:280, left:10, top:42})
// Twitter Container
var twittButton = Ti.UI.createButton({backgroundColor:'red', height:80, width:130, left:10, bottom:20})
// News Container
var newsButton = Ti.UI.createButton({backgroundColor:'red', height:80, width:130, right:10, bottom:20})
newsButton.addEventListener('click',function(e)
{
w.close()
var winBlog = Ti.UI.createWindow({
title: "Blog",
barColor: "#000",
backgroundColor: "#fff",
url:'blog.js'
});
//tabGroup.setActiveTab(news)
Titanium.UI.TabGroup.setActiveTab(2);
winBlog.open();
});
twittButton.addEventListener('click',function(e)
{
w.close()
var twitWin = Ti.UI.createWindow({
title: "Latest Tweets", // Set the title
barColor: "#000",
backgroundColor: "#fff",
url:'twitter.js' // Set the background color to white
});
//Titanium.UI.TabGroup.setActiveTab(2);
twitWin.open();
});
menu.add(productsContainer)
menu.add(newsButton)
menu.add(twittButton)
w.add(menu)
Please Help!?!?!
2 Answers
-
I'm having exactly the same issue, seven months later. Anyone have any ideas?
-
I know this post is a bit old, but just for the record you have to use a Navigation Group.