I am totally new to android development....what piece of code shall I write to move back to the last activity from the current activity on a button click? I use intents to switch between the activities but is there anything specific to resume back on the last activity? Please advise...
Thanks,
按下后退按钮应该做到“开箱即用” ...
If the user clicks on Back button, application will automatically take you to previous Activity. You don't need to do anything.
If what you pretend is to implement that action from current Activity, for example through a Back menu option, just call finish() in your Activity. You can call setResult before that, if you called that activity with startActivityForResult
Ger
By default back resume previous activity.
You should read this to better understand android Activities: http://developer.android.com/guide/topics/fundamentals.html#lcycles
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.