Skip to content

Instantly share code, notes, and snippets.

@davidecassenti
Created February 17, 2014 15:21
Show Gist options
  • Save davidecassenti/9052533 to your computer and use it in GitHub Desktop.
Save davidecassenti/9052533 to your computer and use it in GitHub Desktop.
Appcelerator Titanium | Alloy | Put 2 NavigationWindow inside TabGroup
function openMaster() {
var win = Ti.UI.createWindow({
title: "Master 2",
backgroundColor: 'red'
});
$.master_win.openWindow(win);
}
function openDetail() {
var win = Ti.UI.createWindow({
title: "Detail 2",
backgroundColor: 'green'
});
$.detail_win.openWindow(win);
}
$.index.open();
"Window": {
backgroundColor:"white"
},
"Label": {
color: "#000"
}
<Alloy>
<TabGroup>
<Tab title="Tab 1" icon="KS_nav_ui.png">
<SplitWindow id="splitWin" platform="ios" formFactor="tablet">
<NavigationWindow id="master_win">
<Window title="Master 1">
<Label onClick="openMaster">Master</Label>
</Window>
</NavigationWindow>
<NavigationWindow id="detail_win">
<Window title="Detail 1">
<Label onClick="openDetail">Detail</Label>
</Window>
</NavigationWindow>
</SplitWindow>
</Tab>
<Tab title="Tab 2" icon="KS_nav_views.png">
<Window title="Tab 2">
<Label>I am Window 2</Label>
</Window>
</Tab>
</TabGroup>
</Alloy>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment