SurfaceView for Camera Preview won't get destroyed when pressing Power-Botton
- by for3st
I want to implement a camera preview. For that I have a custom View CameraView extends ViewGroup that in the constructor programatically creates an surfaceView.
I have the following components (higly simplified for beverity):
ScannerFragment.java
public View onCreateView(..) {
//inflate view and get cameraView
}
public void onResume() {
…