Back to project page FxCameraApp.
The source code is released under:
MIT License
If you think the Android project FxCameraApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.af.experiments.FxCameraApp.ogles; /*from w w w . ja v a2 s .c o m*/ import android.content.Context; import android.view.SurfaceHolder; import android.view.SurfaceView; import com.af.experiments.FxCameraApp.camera.CameraHelper; import java.io.IOException; class PreviewSurfaceHelperBase implements PreviewSurfaceHelper { private CameraHelper mCameraHelper; public PreviewSurfaceHelperBase(final CameraHelper camera) { mCameraHelper = camera; } @Override public SurfaceView createPushBufferSurfaceViewIfNeed(final Context context) { final SurfaceView surface = new SurfaceView(context); surface.getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); surface.setKeepScreenOn(true); surface.setWillNotDraw(true); return surface; } @Override public void setZOrderMediaOverlay(final SurfaceView surface) { surface.setZOrderMediaOverlay(true); } @Override public void setPreviewDisplay(final SurfaceHolder holder) throws IOException { mCameraHelper.setPreviewDisplay(holder); } }