关于Activity与SurfaceView的生命周期

程序运行->按HOME键 
Activity调用的顺序是onPause->onStop 
SurfaceView调用了surfaceDestroyed方法 
然后再切回程序 
Activity调用的顺序是onRestart->onStart->onResume 
SurfaceView调用了surfaceChanged->surfaceCreated方法 

按挂断键或锁定屏幕 
Activity只调用onPause方法 
解锁后Activity调用onResume方法 
SurfaceView什么方法都不调用 

猜你喜欢

转载自gdfdfg-tech.iteye.com/blog/2263365