Fix Android ViewShot dropping frames and date overlays by temporarily lifting pointerEvents=none during capture

This commit is contained in:
2026-06-01 10:39:06 +02:00
parent 50df853ca8
commit 0a46baaa9b
2 changed files with 13 additions and 4 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ import { StyleSheet, Image, View } from 'react-native';
interface FrameOverlayProps {
frameAsset: any; // require() asset
isCapturing?: boolean;
}
/**
@@ -10,11 +11,11 @@ interface FrameOverlayProps {
* The frame PNG must have a transparent center (alpha=0) so the photo shows through.
* Positioned absolutely to cover the entire photo canvas.
*/
export default function FrameOverlay({ frameAsset }: FrameOverlayProps) {
export default function FrameOverlay({ frameAsset, isCapturing = false }: FrameOverlayProps) {
if (!frameAsset) return null;
return (
<View style={styles.container} pointerEvents="none" collapsable={false}>
<View style={styles.container} pointerEvents={isCapturing ? "auto" : "none"} collapsable={false}>
<Image
source={frameAsset}
style={styles.frameImage}