-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android wrong display when using custom scrollInterpolator, slideInterpolatedStyle (ios is fine) #282
Comments
also there are problems with swiping on android - after one gesture several cards channged, then scroll back to the one, which should be actually shown |
Hey @EJohnF, Thanks for the detailed and illustrated issue! It would really help if you could manage to get the Snack example working on Android. I might be able to try out your code later this week, but I could give it a look sooner with a working example ;-) In the meantime, can you confirm that you've read the "Custom interpolations" section of the doc, and particularly the "caveats"? |
Thank you @bd-arc for your response! Read it now once again - but this Caveats section not really help - bcs I don't use
|
@bd-arc fixed snack: https://snack.expo.io/@ejohnf/android-wrong-display-problem (also update link in issue) In expo it works a bit better than in screenshot above, since I've added zero opacity for |
Hey @EJohnF, I've taken a look at the example. The fact that only the first item is affected and that it happens only on Android reminds me of an issue I had with a previous version of React Native. If you take a look at these lines, you'll see that the first and last items are centered thanks to some custom padding. A few months ago, this padding was ignored on Android and was throwing off slide's centering. I hope there wasn't a recent regression in React Native... Could you try to override the value locally and see if it allows you to properly center the last item ? |
Hum... Just created a quick example from scratch: apparently, there is a centering issue with all vertical carousels on Android. I need to look into it. |
@bd-arc when I've changed these rows to
And then last item looks better: Thanks! Now problems that all cards show only 2 cards in the stack (instead of 6 in IOS) |
I think I've found how to solve displaying problem:
and it looks like https://yadi.sk/i/cB5-fZsO3TnyEw |
@EJohnF Good finding :-) But a workaround was already mentioned in the doc. I didn't think about telling you because I was assuming that you were already aware of the need to set I would recommend this solution over I still need to look into that bottom padding on Android though... |
I've tried to use And But now get the problem with some overscrolling on Android (while |
Regarding your Android issue, have you tried on a device with a production build? I can't emphasize what's being said in this note enough :-) To provide more context, you need to know that despite being one of the most wanted feature, the React Native team have not implement yet a proper equivalent of the iOS Still, ideas and PR are always welcome ;-) |
FYI: updated to the last version of you library - and now it works fine!! Thanks! |
Is this a bug report or a feature request?
Bug report
Have you read the guidelines regarding bug report?
Yes!
Have you read the documentation in its entirety?
yes, and tip/tricks, and know issues (while it seems that it could be related to its)
Have you made sure that your issue hasn't already been reported/solved?
Checked issues list, didnt' find exactly this one.
may be something similar: #262
but actually I use code from there to customize animation
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
only on android
Is the bug reproductible in a production environment (not a debug one)?
yes
Have you been able to reproduce the bug in the provided example?
Reproduce in expo https://snack.expo.io/@ejohnf/android-wrong-display-problem
Environment
Environment:
"react": "16.2.0",
"react-native": "0.53.3",
"react-native-snap-carousel": "https://github.com/archriss/react-native-snap-carousel#1eaf0c0",
Target Platform:
Android API_25
Steps to Reproduce
Expected Behavior
I'm trying to achive that design:
on IOS is looks perfect:
(and all other cards looks good, and animation cool)
Actual Behavior
Last item on Android:
All other items:
Reproducible Demo
https://snack.expo.io/@ejohnf/android-wrong-display-problem
The text was updated successfully, but these errors were encountered: