Closed robclouth closed 8 years ago
Hi @robclouth I really need to document this ;)
Here's an extract that shows how to use a custom fade animation :
fade: new Animated.Value(0),
<Popover
...
backgroundStyle={{opacity: this.state.fade}}
popoverStyle={{opacity: this.state.fade}}
contentStyle={{backgroundColor: 'green'}}
startCustomAnimation={this._startCustomAnimation}
>
<Text style={styles.popoverText}>Content</Text>
</Popover>
_startCustomAnimation({show, doneCallback}) {
Animated.timing(this.state.fade, {
toValue: show ? 1 : 0,
}).start(doneCallback);
},
Let me know how it works for you.
Worked a treat thanks!
Hey, I'm having issues getting the custom animation to work using startCustomAnimation. It seems like to use startCustomAnimation properly you have to use internal methods. Has anyone managed to do this in an elegant way?
Thanks
Edit: I'm using the latest version