Android: questions about the re-creation of surfaceView ., Androidsurfaceview
Recently, I was working on an Android Video Player project and encountered a problem: After the screen lock, surfaceview will be destroyed and various errors will occur. I posted a post on the csdn forum to ask questions. All the so-called gods said that the unlock screen was being re-created and asked him how to do it, so no response was returned. Later, I also tried to create it manually, but reported that surfaceview must be created before mediaPlayer.
In fact, you do not need to create a new one !!! After the screen is unlocked, surfaceview is automatically re-created. Therefore, you only need to restore the screen to its previous status after the screen is re-created.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.