My app is all enclosed inside a ScrollView. When the user clicks the Android back button, I'd like to go back to the previews page of the scrollable view, instead of closing the app. The app should close only when the user clicks the back button while on page 0. Is this possible, and how?
I found the answer: Use the android:back event AND set the main window as "modal: true"
var win = Titanium.UI.createWindow({
modal: true,
exitOnClose:true
});
win.addEventListener('android:back', function (e) {
// do what you want here
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With