About the life cycle of Activity and SurfaceView

The sequence of program running -> press the HOME button 
Activity call is onPause->onStop 
SurfaceView calls the surfaceDestroyed method 
and then switch back to the program 
The sequence of Activity calls is onRestart->onStart->onResume 
SurfaceView calls the surfaceChanged->surfaceCreated method 

Press the hang up key Or lock the screen 
Activity only calls the onPause method 
after unlocking the Activity calls the onResume method 
SurfaceView does not call any methods 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326270407&siteId=291194637