So, I am building an app that opens a CameraPreview (using this library for now
https://github.com/ujizin/Camposer) .
However, it seems like the CameraPreview, for the time of transition, is not staying within itβs bounds. To illustrate the behavior I am wrapping the Preview in a BoxWithConstraints and settings the requiredSize to height/width - 100.dp (that explains the gap on the side and bottom. So like this:
BoxWithConstraints(modifier.background(Color.Red)) {
CameraPreview(
cameraState = cameraState,
imageAnalyzer = imageAnalyzer,
enableTorch = isTorchOn,
isFocusOnTapEnabled = false,
modifier = Modifier.requiredSize(this.maxWidth - 100.dp, this.maxHeight - 100.dp)
) { .... }
}
The translation used is:
val slideInHorizontallyAndFadeIn = slideInHorizontally(
initialOffsetX = { 300 },
animationSpec = tween(
durationMillis = 400,
easing = FastOutSlowInEasing
)
) + fadeIn(animationSpec = tween(400))
Any idea what cold cause this?