简体   繁体   中英

Android: Press Back Button onCreate method is not called

I tested of my application in my Samsung device. I realized that when I pressed on back button of my device, application does not recall the OnCreate method on previous activity. It just resumes previous activity page only. May I know how can I call onCreate method of previous page when I click on back button. Thanks

To me it sounds like you are opening a second activity to get some information and then applying the changes to the previous activity.

http://developer.android.com/training/basics/intents/result.html

If not you should look at the Activity lifecycle so that you understand where to put your update code:

http://developer.android.com/reference/android/app/Activity.html

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM