Popular Searches
KAz
KAKAKA

Fff

4
  • 2 br
  • Modern Farmhouse
  • ~600 sqft
  • Couple Living
  • HDB (Resale)
  • Fff
    {/* Fixed header that stays in place */} {header && <View style={styles.fixedHeader}>{header}</View>} <Animated.View style={[styles.animatedRow, animatedStyle]}> {pictures.map((picture, index) => ( <View key={`pic-${index}-${picture?.id}`} style={{ width }}> {renderItem({ item: picture, index })} </View> ))} </Animated.View>
  • Fff
    const velocity = event.velocityX const page = Math.round(Math.abs(translateX.value) / width) let targetPage = page if (Math.abs(velocity) > 200) { const direction = Math.sign(velocity) targetPage = Math.max( 0, Math.min(pictures.length - 1, page - direction) ) } const snapPoint = -targetPage * width translateX.value = withSpring(snapPoint, { damping: 20, stiffness: 200, mass: 0.5 })
0
Share this post