Issue
I am developing a mobile app for android, with eclipse as my platform. Whenever I use the back button of the mobile using the emulator, the app closes. I want to just go back to the previous page, but it exits the app. How can I do it? I really hope you could me with this. Thanks in advance!
Solution
Before u start a new Activity, you should not call finish () on the current Activity If Finish () is not called and you move to a new activity, and press BACK then you will be taken to the previous activity...
learn about the activity lifecycle, and you will understand http://stuffthathappens.com/blog/2008/11/05/android-activity-lifecycle-updated/ http://www.anddev.org/lifecycle_of_an_activity-t81.html
Answered By - amithgc
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.