The Activity class will call finish() on itself if you do not
explicitly handle KEYCODE_BACK in your Activity's onKeyDown()
function. In general the system maintains a stack of activities for
you, pushing a new one when you call startActivity() and poping one
when the user hits back or you call finish() on an activity.

You can create a single activity that manages its own internal stack
of states, but it's much easier to create a new subclass of Activity
for each state you want and let the system handle that for you.

-Jeff

On Fri, Sep 12, 2008 at 10:16 PM, dai <[EMAIL PROTECTED]> wrote:
>
> ciao, does someone know what/how android implements the back button?
> If I add back button myself, Do I have to do something(use stack to
> remember activity) myself?
>
> Thank you so much
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to