How to solve SurfaceHolder.setType deprecated ? Is there any other method?

6.9k Views Asked by At

What is used in place of surfaceholder.settype ?

PreviewHolder = CameraPreview.getHolder();
       PreviewHolder.addCallback(this);
       if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB)

        PreviewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
1

There are 1 best solutions below

0
On BEST ANSWER

For 3.0 (honeycomb) and higher, you do not need to call this method at all. As the docs state, it is ignored and set automatically. SurfaceHolder.setType is deprecated… But required?