Skip to content

Instantly share code, notes, and snippets.

@jonalter
Created September 6, 2011 20:35
Show Gist options
  • Select an option

  • Save jonalter/1198871 to your computer and use it in GitHub Desktop.

Select an option

Save jonalter/1198871 to your computer and use it in GitHub Desktop.
Android: exitOnClose
var win1 = Ti.UI.createWindow({
backgroundColor : 'white',
fullscreen: true,
exitOnClose: true
});
var button = Ti.UI.createButton({
title : 'Open',
width : 150,
height : 40,
top : 20
});
win1.add(button);
button.addEventListener('click', function() {
var win2 = Ti.UI.createWindow({
backgroundColor: 'blue'
});
win2.open();
win2.addEventListener('android:back', function(e){
win1.close();
});
});
win1.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment