You need to capture the Back keyevent...
public boolean onKeyDown(int keyCode, KeyEvent event){
if((keyCode == KeyEvent.KEYCODE_BACK)){
// put your code to recall page here
}
return super.onKeyDown(keyCode, event);
}
But you have to be careful because "Back" is also how the user expects
to leave the app (which is why your app is closing...you're at the
main activity it sounds like when the user hits back).
Ken
On Feb 22, 8:26 pm, StouteEnterprises <[email protected]> wrote:
> I can not figure a way to make the back button recall the last loaded
> page in my applications.
>
> Search: "Stoute" in market for the apps.
>
> When you click the back button it closes the application.
>
> Can someone help me figure this out? I tried looking it up in the
> developer tools and got lost in a string of code.
>
> Is there an easy way to solve this problem? If so what is the answer?
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en