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();
}
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);
});
}
Aggregations