簡體   English   中英

反應原生甲板刷卡庫

[英]react native deck swiper library

在此處輸入圖片說明

我正在嘗試更改下面顯示的圖像的布局 我想將它們顯示在頂部 我只想更改下面顯示的圖像的布局 我想將它們顯示在第一張卡片上方

 export default function App({navigation}) { const [index, setIndex] = React.useState(0); const onSwiped = () => { transitionRef.current.animateNextTransition(); setIndex((index + 1) % data.length); }; return ( <SafeAreaView style={styles.container}> <View style={{ backgroundColor: 'black', opacity: 0.05, transform: [{rotate: '45deg'}, {scale: 1.6}], position: 'absolute', left: -15, top: 30, }}></View> <View style={styles.swiperContainer}> <Swiper ref={swiperRef} cards={data} cardIndex={index} renderCard={card => <Card card={card} />} infinite backgroundColor={'transparent'} onSwiped={onSwiped} onTapCard={() => swiperRef.current.swipeLeft()} cardVerticalMargin={50} stackSize={stackSize} animateCardOpacity={true} stackScale={8} stackSize={3} verticalSwipe={false} stackSeparation={13} animateOverlayLabelsOpacity animateCardOpacity disableTopSwipe disableBottomSwipe /> </View> </SafeAreaView> ); }

在您的樣式中更改它:頂部:30 => 頂部:-30

使用堆棧分隔。 堆棧分隔={-20}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM