I am wrapping a PReviewView in an AndroidView to use in a Compose view. But when I start the camera ...
t
I am wrapping a PReviewView in an AndroidView to use in a Compose view. But when I start the camera capture, the view is resized larger than I have set for the AndroidView via modifiers (fillMaxWidth.aspectRatio). Has anybody run into this, and any solutions available? Using camwerax 1.2.2 (1.3.0-alhpa06 no change). Thanks.
Okay, I fixed with a .clipToBounds()... 🙂
s
I have an example here: https://github.com/sproctor/camerax-compose-example/blob/master/app/src/main/java/com/example/cameraxcomposeexample/MainActivity.kt#L75 I've been using something very close to this in production for 2 years. Compose 1.4.0 has a bug with modifiers on
AndroidView
, which is fixed in 1.4.1.