fix: Fix PreviewView being stretched (#2519)

* fix: Fix Preview stretching

* feat: Keep screen on on Android

* Add test code for race condition

* fix: Fix preview stretching by awaiting SurfaceHolder resizing (`setFixedSize`)  before configuring Camera

* Format

* Update SurfaceHolder+resize.kt

* Update CameraPage.tsx
This commit is contained in:
Marc Rousavy
2024-02-07 11:50:33 +01:00
committed by GitHub
parent b20d0fc5f7
commit 3192f5e939
5 changed files with 53 additions and 14 deletions

View File

@@ -99,7 +99,6 @@ export function CameraPage({ navigation }: Props): React.ReactElement {
},
[isPressingButton],
)
// Camera callbacks
const onError = useCallback((error: CameraRuntimeError) => {
console.error(error)
}, [])