How to use onResume()?
问题 Can anyone give me an example that uses onResume() in Android? Also, if I want to restart the activity at the end of the execution of another, which method is executed— onCreate() or onResume() ? And if I want to update data, how do I put it in onResume()? 回答1: Any Activity that restarts has its onResume() method executed first. To use this method, do this: @Override public void onResume(){ super.onResume(); // put your code here... } 回答2: Restarting the app will call OnCreate() . Continuing