appcelerator - what is the point of "exitonclose" -
so read this, about how closing android app "bad". don't understand imply "exitonclose", ah, parameter? on window doesn't have purpose android app.
i know apple discourage people exiting app, presumably doesn't have purpose ios either.
so point of exitonclose then?
exitonclose property of user interface window class. property force close window when user tap on "back" button of android device , window opened.
also, can quit app code:
ti.android.currentactivity.finish(); for example (mywindow = ui.window.createwindow ...):
var quitfunction = function quitfunction() { var dialog = ti.ui.createalertdialog({ cancel : 1, buttonnames : ['accept', 'cancel'], message : 'do want exit?', title : 'quit app' }); dialog.addeventlistener('click', function(e) { if (e.index === 0) { ti.android.currentactivity.finish(); } dialog.hide(); dialog = null; }); dialog.show(); }; mywindow.addeventlistener('android:back', quitfunction); quitfunction can changed other purpose , can control programatically call.
ios have not phisical button, can not use property this.
Comments
Post a Comment