Fix Android ViewShot dropping frames and date overlays by temporarily lifting pointerEvents=none during capture
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user