Ok so i want to simulate the hardware previous button by doin this on a page.
var buttonBack = Ti.UI.createButton({
title:"Terug",
left:10,
right:10,
top:70,
height:50
});
Ti.UI.currentWindow.add(buttonBack);
buttonBack.addEventListener("click", function() {
finish();
})
But i get an reference error telling me finish is not defined… Am i using this wrong? This is kinda my first titanium app so don’t kill me plox :$
finishis a method ofTitanium.Android.Activityso you have to get the activity first:Titanium.Android.Activity