I've created a custom camera view for Android. I have overlayed the camera preview with a semi transparent LinearLayout with a TextView and Button. Now I need to punch a 'hole' in the middle of the view so you can see the underlying camera preview clearly . The hole then acts as a frame guideline allowing the user to 'frame' the photo.
I succeeded with the iOS version by creating a view and cutting out a rectangle from the view as demonstrated here. How would I go about doing the same thing for Android?
Use SurfaceView.
"the SurfaceView punches a hole in its window to allow its surface to be displayed"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With