Home » Android » android – Which method is called when my activity gets the focus? (after a phone call, back key, home key, etc…)

android – Which method is called when my activity gets the focus? (after a phone call, back key, home key, etc…)

Posted by: admin June 15, 2020 Leave a comment

Questions:

I have a problem with my app. It has a lot of activities. Two of them have google map views. My A activity has a full MapView and my B activity has a small MapView. OK, when I am on the B activity and press back key sometimes until I return to my A activity, the map of my A activity shows with errors, with a black zone on the bottom of the screen. This only happens when I press back from the B activity.

Because of this I need to know which method is called in A when it gets the focus, because I need to implement/override it to REPAINT ALL THE WINDOW AGAIN FROM SCRATCH.

Also which code I have to put to repaint all the window from scratch?

How to&Answers:
@Override
public void onResume() {
 super.onResume();

}