fix: move CameraScreen off-screen when not active so TextureView doesn't cover UI
This commit is contained in:
@@ -147,7 +147,13 @@ export default function App() {
|
|||||||
Keep CameraScreen ALWAYS mounted in the background to prevent
|
Keep CameraScreen ALWAYS mounted in the background to prevent
|
||||||
Android expo-camera hardware crashes when unmounting right after capture
|
Android expo-camera hardware crashes when unmounting right after capture
|
||||||
*/}
|
*/}
|
||||||
<View style={StyleSheet.absoluteFill}>
|
<View
|
||||||
|
style={[
|
||||||
|
StyleSheet.absoluteFill,
|
||||||
|
currentScreen !== 'camera' && { opacity: 0, zIndex: -10, transform: [{ translateX: -10000 }] }
|
||||||
|
]}
|
||||||
|
pointerEvents={currentScreen === 'camera' ? 'auto' : 'none'}
|
||||||
|
>
|
||||||
<CameraScreen
|
<CameraScreen
|
||||||
countdownDuration={settings.countdownDuration}
|
countdownDuration={settings.countdownDuration}
|
||||||
onPhotoCaptured={handlePhotoCaptured}
|
onPhotoCaptured={handlePhotoCaptured}
|
||||||
@@ -169,7 +175,7 @@ export default function App() {
|
|||||||
|
|
||||||
{/* Overlay PreviewScreen if active */}
|
{/* Overlay PreviewScreen if active */}
|
||||||
{currentScreen === 'preview' && (
|
{currentScreen === 'preview' && (
|
||||||
<View style={StyleSheet.absoluteFill}>
|
<View style={[StyleSheet.absoluteFill, { zIndex: 100, elevation: 100, backgroundColor: '#000' }]}>
|
||||||
<PreviewScreen
|
<PreviewScreen
|
||||||
photoUris={photoUris}
|
photoUris={photoUris}
|
||||||
printerIp={settings.printerIp}
|
printerIp={settings.printerIp}
|
||||||
@@ -188,7 +194,7 @@ export default function App() {
|
|||||||
|
|
||||||
{/* Overlay AdminScreen if active */}
|
{/* Overlay AdminScreen if active */}
|
||||||
{currentScreen === 'admin' && (
|
{currentScreen === 'admin' && (
|
||||||
<View style={StyleSheet.absoluteFill}>
|
<View style={[StyleSheet.absoluteFill, { zIndex: 100, elevation: 100, backgroundColor: '#000' }]}>
|
||||||
<AdminScreen
|
<AdminScreen
|
||||||
currentSettings={settings}
|
currentSettings={settings}
|
||||||
onSave={handleSaveSettings}
|
onSave={handleSaveSettings}
|
||||||
|
|||||||
Reference in New Issue
Block a user