On Mon, Aug 15, 2011 at 5:13 AM, mark2011 <[email protected]> wrote:
>    I want to set the back & home function in my API.

That sentence is unclear.

> I use finish or system.exit(0) to return my last page.

Do not use System.exit(0) in any production-grade Android application.

> How do I go back to my home page?

Call startActivity() with an Intent identifying your home page,
perhaps with appropriate flags to control the stack (e.g.,
FLAG_ACTIVITY_CLEAR_TOP|FLAG_ACTIVITY_SINGLE_TOP).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
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