Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions ActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ const ActionButton = props => {

useEffect(() => {
if (props.active) {
Animated.spring(anim.current, { toValue: 1 }).start();
Animated.spring(anim.current, { toValue: 1,useNativeDriver:false }).start();
setActive(true);
setResetToken(props.resetToken);
} else {
props.onReset && props.onReset();

Animated.spring(anim.current, { toValue: 0 }).start();
Animated.spring(anim.current, { toValue: 0,useNativeDriver:false }).start();
timeout.current = setTimeout(() => {
setActive(false);
setResetToken(props.resetToken);
Expand Down Expand Up @@ -148,8 +148,8 @@ const ActionButton = props => {
onPressIn={props.onPressIn}
onPressOut={props.onPressOut}
>
<Animated.View style={wrapperStyle}>
<Animated.View style={[buttonStyle, animatedViewStyle]}>
<Animated.View style={wrapperStyle} >
<Animated.View style={[buttonStyle, animatedViewStyle]}>
{_renderButtonIcon()}
</Animated.View>
</Animated.View>
Expand Down Expand Up @@ -178,6 +178,7 @@ const ActionButton = props => {

return (
<Animated.Text

style={[
styles.btnText,
buttonTextStyle,
Expand Down Expand Up @@ -254,7 +255,7 @@ const ActionButton = props => {
if (active) return reset(animate);

if (animate) {
Animated.spring(anim.current, { toValue: 1 }).start();
Animated.spring(anim.current, { toValue: 1,useNativeDriver:false }).start();
} else {
anim.current.setValue(1);
}
Expand All @@ -266,7 +267,7 @@ const ActionButton = props => {
if (props.onReset) props.onReset();

if (animate) {
Animated.spring(anim.current, { toValue: 0 }).start();
Animated.spring(anim.current, { toValue: 0,useNativeDriver:false }).start();
} else {
anim.current.setValue(0);
}
Expand All @@ -281,6 +282,7 @@ const ActionButton = props => {
return (
<View pointerEvents="box-none" style={[getOverlayStyles(), props.style]}>
<Animated.View

pointerEvents="none"
style={[
getOverlayStyles(),
Expand Down