On Tue, Mar 29, 2011 at 9:29 AM, vani reddy <[email protected]> wrote:
>  How to make a button in my activity behave like a back button?

Ideally, you do not do this. Do not waste screen space and confuse the
user, since there already is a BACK button on any compliant Android
device.

That being said, you can call finish() to close the current activity
and return control to the previous activity. One legitimate use of
this is with startActivityForResult() -- the activity that is started
this way might call finish() after setResult() to immediately return
control to the previous activity.

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

Android Training...At Your Office: http://commonsware.com/training

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