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

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?


public void onResume() {


Need Your Help

How to download image from url

c# url download

Is there a way to download an image directly from a url in c# if the url does not have an image format at the end of the link? Example of url:

pymongo- How can I have distinct values for a field along with other query parameters

python mongodb pymongo

I am using pymongo and want to have distinct values for a field such that I can also pass other query parameters. For example, I have entries like: