Search in sources :

Example 1 with PreviewSurfaceView

use of com.iknow.android.features.record.view.PreviewSurfaceView in project Android-Video-Trimmer by iknow4.

the class VideoRecordActivity method initUI.

@Override
public void initUI() {
    setContentView(R.layout.activity_video_recording);
    mIvRecordBtn = this.findViewById(R.id.ivRecord);
    mIvSwitchCameraBtn = this.findViewById(R.id.ivSwitch);
    ImageView ivBack = this.findViewById(R.id.iv_back);
    mIvRecordBtn.setOnClickListener(this);
    mIvSwitchCameraBtn.setOnClickListener(this);
    ivBack.setOnClickListener(this);
    mCameraSurfaceViewLy = findViewById(R.id.layout_surface_view);
    mGLView = new PreviewSurfaceView(this);
    mCameraSurfaceViewLy.addView(mGLView);
    mGLView.startPreview();
}
Also used : ImageView(android.widget.ImageView) PreviewSurfaceView(com.iknow.android.features.record.view.PreviewSurfaceView)

Example 2 with PreviewSurfaceView

use of com.iknow.android.features.record.view.PreviewSurfaceView in project Android-Video-Trimmer by iknow4.

the class VideoSelectActivity method initCameraPreview.

private void initCameraPreview() {
    mSurfaceView = new PreviewSurfaceView(this);
    mBinding.cameraPreviewLy.setVisibility(View.VISIBLE);
    mBinding.openCameraPermissionLy.setVisibility(View.GONE);
    addSurfaceView(mSurfaceView);
    mSurfaceView.startPreview();
    mBinding.cameraPreviewLy.setOnClickListener(v -> {
        mSurfaceView.release();
        VideoRecordActivity.call(this);
    });
}
Also used : PreviewSurfaceView(com.iknow.android.features.record.view.PreviewSurfaceView)

Aggregations

PreviewSurfaceView (com.iknow.android.features.record.view.PreviewSurfaceView)2 ImageView (android.widget.ImageView)1