i make simple titanium mobile application. at first i want to open new window when i press some button. when i use modal window, it can show a title bar so i can put back button in there, like this:

Here’s my code for do that :
var MainMenu = require('ui/common/option2/MainMenu');
var mainMenuWindow = Titanium.UI.createWindow({
title:'Main Menu',
backgroundColor:'white',
modal:true,
navBarHidden:Ti.Platform.osname ==='android' ? true : false
});
var mainMenu = new MainMenu(mainMenuWindow);
mainMenuWindow.add(mainMenu);
mainMenuWindow.open();
but if i clear modal:true the title bar is not shown like this :

Has anyone know how to show/add title bar when open new window without modal? i’ve tried using toolbar, but it was really troublesome because i should define the font size, and even position of the button 🙁 any suggestion for that? many thanks..
Actually there is a problem in showing the title bar without using modal, so for that here is the tweak.
You have to add a tabgroup and add your window to its tab and set `tabBarHidden’ to true for that window.
you will see your title bar when you run the app..
here is the sample code for it
The above solution will work in iOS.
For Android here is the trick:
Add these lines to your
<app-project-dir>/platform/android/res/layout/titanium_tabgroup.xmlfile.