A demo for custom camera
I use the prodect of cropper to achieve the function of cropper.
the site of cropper: https://github.com/edmodo/cropper
<com.bbk.lling.camerademo.camare.CameraPreview
android:id="@+id/cameraPreview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Visit this post, for more details.