Closed syarofanz closed 5 years ago
Still not able to found the root cause, but i managed to fix mine by adding perspective={1000}
to the FlipCard component
got the same issue and still not working after I add perspective={1000} to the FlipCard component
Only in Android ? Fix works 👍
Please add changes to the library, Thank you
Was this ever updated in the lib? I can submit a PR with the change if necessary, but why the arbitrary value of 1000? Is this the correct/valid value?
Looks this this is a known issue. See the following from React Native animation docs: https://facebook.github.io/react-native/docs/animations
While using transform styles such as rotateY, rotateX, and others ensure the transform style perspective is in place. At this time some animations may not render on Android without it. Example below.
<Animated.View
style={{
transform: [
{scale: this.state.scale},
{rotateY: this.state.rotateY},
{perspective: 1000}, // without this line this Animation will not render on Android while working fine on iOS
],
}}
/>
Looks like the right approach here might be to change the defaultProp in Flip Card to be 1000 instead of 0. I'll submit a PR
If i flip the card will be error Invariant Violation: Transform with key of "perspective" cannot be zero: {"perspective":0}, that's bug ?