You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workaround for blank camera preview when switching to tabletop mode
Switching to/from tabletop mode causes the underlying SurfaceView to
destroy and recreate its Surface, but the Camera doesn't know its
been destroyed. This is a known issue with SurfaceView in Compose.
See: https://issuetracker.google.com/275157240
To workaround this issue, detect when the folding state enters or
leaves tabletop mode and manually invalidate the CameraX
SurfaceRequest so it will generate a new one.
0 commit comments