react-native-snap-carousel icon indicating copy to clipboard operation
react-native-snap-carousel copied to clipboard

Extra Padding Between Carousel and parent View with marginTop

Open rohitkum28 opened this issue 4 years ago • 2 comments

Is this a bug report, a feature request, or a question?

Question

Have you followed the required steps before opening a bug report?

(Check the step you've followed - put an x character between the square brackets ([]).)

Have you made sure that it wasn't a React Native bug?

Yes

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

Currently tested it with only Android

Is the bug reproductible in a production environment (not a debug one)?

Haven't tried in production environment

Environment

Environment: React: 16.9.0 React native: 0.61.2 react-native-snap-carousel: ^3.8.4

Target Platform: Android (6.0)

Expected Behavior

When I use marginTop in my parent View of Horizontal Carousel, I am getting some extra padding in the bottom. The padding increases as I increase the marginTop. not_working

I already tried the suggestions mentioned in https://github.com/archriss/react-native-snap-carousel/issues/489 and it didn't resolve the problem.

Actual Behavior

There shouldn't be any padding at the bottom when I use marginTop in style of my parent View.

Reproducible Demo

https://snack.expo.io/B1S-Ht96B

Steps to Reproduce

  1. Change marginTop value from 0 to 50%
  2. You will observe the bottom padding keeps increasing with the same

rohitkum28 avatar Dec 08 '19 14:12 rohitkum28

Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2

dohooo avatar Oct 08 '21 05:10 dohooo

was this resolved? I'm getting the same issue, putting flexGrow: 0 and padding: 0 didn't resolve it

isonlaxman avatar Apr 07 '22 12:04 isonlaxman