Last active
June 20, 2022 11:27
-
-
Save itsramiel/8cce4d71b7871af0d68f72c2e2dc3bca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const style1 = useAnimatedStyle(() => { | |
return { | |
width: VIEW_WIDTH, | |
height: VIEW_HEIGHT, | |
backgroundColor: "white", | |
position: "absolute", | |
top: FAB_SIZE / 2 - VIEW_HEIGHT / 2, | |
left: FAB_SIZE / 2 - VIEW_WIDTH / 2, | |
}; | |
}, []); | |
return ( | |
<View style={styles.container}> | |
<StatusBar style="auto" /> | |
<AnimatedPressable | |
style={[styles.fabContainer, FabStyle]} | |
onPress={() => (progress.value = withTiming(1))} | |
onLongPress={() => (progress.value = withTiming(0))} | |
> | |
<Animated.View style={style1} /> | |
</AnimatedPressable> | |
</View> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment