Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DmitryB11 opened this issue Oct 15, 2023 · 0 comments

Comments

@DmitryB11
Copy link

DmitryB11 commented Oct 15, 2023

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 #489 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant