alexbrillant / react-native-deck-swiper

tinder like react-native deck swiper
ISC License
1.57k stars 464 forks source link

View takes up the whole screen. #373

Open aliraza96 opened 3 years ago

aliraza96 commented 3 years ago

View takes up the whole screen. Cannot remove the blue background from the screen. Can anyone help ? And gestures also works on the whole screen. So anyway to limit it's height ?

FatjonRrapaj commented 2 years ago

Hello, to remove the blue background just give the prop backgroundColor={"transparent"} For the gesture that takes the whole screen you can give it a marginBottom= screen height, but that's a hack, I'm actually looking for a better solution

And to control it's height, use the prop containerStyle Example: <Swiper containerStyle={{ height: height / 2 + 60, {/* your desired height goes here,and don't forget to tweak the card height according to this* /} overflow: 'hidden', }} ...otherProps />

devinhadley commented 1 year ago

Hello, to remove the blue background just give the prop backgroundColor={"transparent"} For the gesture that takes the whole screen you can give it a marginBottom= screen height, but that's a hack, I'm actually looking for a better solution

And to control it's height, use the prop containerStyle Example: <Swiper containerStyle={{ height: height / 2 + 60, {/* your desired height goes here,and don't forget to tweak the card height according to this* /} overflow: 'hidden', }} ...otherProps />

You find a better solution to fixing the gesture handler taking up the whole screen?