<How to scale the camera preview to any given dime...
# stackoverflow
u
How to scale the camera preview to any given dimensions or shapes in a translucent background using Jetpack Compose I have a dialog fragment with a translucent background. I want to place a camera preview on this dialog fragment either in the shape of a circle or a square. On setting the scale type as PreviewView.ScaleType.FIT_CENTER, the preview is as follows:

camera preview with black borders

Whereas, if I were to set the scale type as PreviewView.ScaleType.FILL_CENTER, the preview is as follows: <a...