alexbrillant / react-native-deck-swiper

tinder like react-native deck swiper
ISC License
1.56k stars 465 forks source link

Rotate Device does not work properly #85

Closed ChristophRob closed 6 years ago

ChristophRob commented 6 years ago

When i use the example code and rotate my phone, the Swiper is located wrong. After reload everything is fine again. Has someone already a fix for this?

ChristophRob commented 6 years ago

Solution: initializeCardStyle should get updated when the Dimensions change and const { height, width } = Dimensions.get('window') should be part of that calculation

webraptor commented 6 years ago

Our app is lock oriented. You're free to create a PR with a fix :)

danielemontecchi commented 6 years ago

We have the same problem. Even if you lock the orientation (e.g. in landscape), if the device is held in portrait, the Swiper takes the portrait size and render the card badly. Exactly as @ChristophRob says.

webraptor commented 6 years ago

Hey @ChristophRob and @akajack Just created a PR for the issue: https://github.com/alexbrillant/react-native-deck-swiper/pull/181