Problem
While opening second window and putting the exitOnClose: true property together with navBarHidden, make the application not getting closed while pressing the Back Hardware button.
Reproducible Steps
1. Execute the sample code
2. Press the "Press Me" button
3. Press the Back button on your Android device (should exit the application, but it doesn't)
Workaround
Remove navBarHidden properties from all the windows or close all the previous opened windows.
Sample Code
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({
title:'Win1',
backgroundColor:'#fff',
exitOnClose:true,
navBarHidden:true
});
var but1 = Titanium.UI.createButton({title:'Press me', width:'auto'});
var but4 = Titanium.UI.createButton({title:'LogOut', width:'auto'});
var win3 = Titanium.UI.createWindow({
title:'Win2',
backgroundColor:'#fff',
exitOnClose:true,
navBarHidden:true
});
win1.add(but1);
but1.addEventListener("click",function(e){
win3.open();
});
win1.open();
Associated HelpDesk Ticket
http://appc.me/a/APP-548793
Same problem happens to me. Any ideas?
cannot reproduce Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Android Emulator: Android SDK version: 2.2
Closing ticket as the issue cannot be reproduced.