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()?
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...
}