-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Description
RuntimeException android.graphics.RecordingCanvas in throwIfCannotDraw
type HeaderBottomMaskedProps = {
children?: ReactNode;
disabled?: boolean;
};
const toBlack = ['rgba(0,0,0,0)', 'rgb(0,0,0)'];
const fromBlack = ['rgb(0,0,0)', 'rgba(0,0,0,0)'];
const blackStyle = {
flex: 1,
backgroundColor: '#000000',
marginTop: -0.1,
marginBottom: -0.1,
} as const;
const height20 = { height: 20 };
const maskedViewStyle = {
flex: 1,
display: 'flex',
flexDirection: 'column',
} as const;
const HeaderBottomMasked: FC<HeaderBottomMaskedProps> = ({
children,
disabled = false,
}) => {
const { height } = useWindowDimensions();
return (
<MaskedView
maskElement={
disabled ? (
<View style={blackStyle} />
) : (
<View
style={{
maxHeight: height,
flex: 1,
display: 'flex',
flexDirection: 'column',
}}
>
<LinearGradient colors={toBlack} style={height20} />
<View style={blackStyle} />
<LinearGradient colors={fromBlack} style={height20} />
</View>
)
}
style={maskedViewStyle}
>
{children}
</MaskedView>
);
};
export default memo(HeaderBottomMasked);Anyone can help me?
children have FlatList
krisidmisso
Metadata
Metadata
Assignees
Labels
No labels