alexbrillant / react-native-deck-swiper

tinder like react-native deck swiper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

View takes up the whole screen.

aliraza96 opened this issue · comments

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 ?

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 />

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?