onPause/onResume is not a good place to do it because the UI might still be visible (for example…
Eugenio Marletti
22
The problem we are facing here is reloading of the View. In case of onResume()/onPause() we reload the view(which could mean heavy processing, depending on what kind of view we are using) when the view is either partially or fully invisible to user.
If we are to use onStart()/onStop() we still have the same reloading problem. The only cases we ignored are when the cases when the view is partially invisible to user. But there are still a lot of cases (e.g. lock screen, switch between activity, press home button) in which onStart()/onStop() model will make our view reload, because onStop() gets called when the view(Activity/Fragment) is not visible (fully) to the user.