react-native-view-shot icon indicating copy to clipboard operation
react-native-view-shot copied to clipboard

react-native-view-shot error: failed to capture view snapshot on android with MaskedView from '@react-native-community/masked-view'

Open DmitryB11 opened this issue 2 years ago • 2 comments

I use react-native-view-shot and it works with no problem on iOS but on Android I got error: failed to capture view snapshot I put collapsable={false} but it is not works. It only works if I remove MaskedView, but I can't do it because I need it in my code. My code about the same as in this post. MaskedView from '@react-native-community/masked-view'

  <MaskedView maskElement={
    <Text style={[styles.label, styleLabelAlign, styleLabelSize, styleLabelWeight, props.styleText]}>
      {labels?.join('\n')}
    </Text>
  }>
    <LinearGradient start={{ x: 0, y: 1 }} end={{ x: 1, y: 0 }} colors={[props.primaryColor, props.secondaryColor]}>
      <Text style={[styles.label, styleLabelAlign, styleLabelSize, styleLabelWeight, props.styleText, { opacity: 0 }]}>{labels?.join('\n')}</Text>
    </LinearGradient>
  </MaskedView>

`

Originally posted by @prani95 in https://github.com/gre/react-native-view-shot/issues/489#issuecomment-1708513771

DmitryB11 avatar Oct 15 '23 04:10 DmitryB11

Hey @DmitryB11 Did you get a solution for the problem?

srivastava9 avatar Jul 30 '24 11:07 srivastava9

Hi @srivastava9 did you get a solution please?

Hey @DmitryB11 Did you get a solution for the problem?

Octagon-simon avatar Nov 15 '24 17:11 Octagon-simon