-
Notifications
You must be signed in to change notification settings - Fork 369
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
Spacing between 1st right & 1st left item in Carousel #34
Comments
Hi @saisasanksunkavalli. I suggest you to write custom ZoomPostLayoutListener. And change scale parameter not so fast. This will resolve your issue. |
A nice API wouldn't go amiss though. Perhaps a setter which takes a value and applies that to the scale given? |
Yep, @Kisty. I was thinking about it, but haven't started this yet :) |
Perhaps it might be worth offering a few effects, such as on using a slow drop off, like
And perhaps using cos(x) for medium dropoff. |
Hi! I'm having the same problem.
I thought this would make the difference between views the same, but I'm getting the same result as OP (with a vertical orientation).
Am I missing something? |
same problem :( |
Can someone tell how to increase the height of the views which are immediate left and right of the center element ? |
@NirmalyaSin |
Yes I am doing so but the gap between the views are changing, height of the immediate left and right views are not getting changed. Can you please tell which variables can be altered to get the result ? |
As I remember you should change scale @NirmalyaSin |
final float scale = (float) (2 * (2 * -StrictMath.atan(Math.abs(itemPositionToCenterDiff) + 1.0) / Math.PI + 1)); @mig35 can you explain how you are setting the scale here ? |
this is a kind of magic to convert item position (from 0 to maxVisibleItems) to scale factor that is needed to be for this item. you can play around with this function @NirmalyaSin |
@mig35 Yes but I need to change the height of the visible items apart from the center one. But the height is not getting changed. Can you tell me how to increase or decrease the height ? |
@NirmalyaSin You can debug the library and if you find any issue you are welcome to write a PR. |
Thanks a lot @mig35 I was able to attain the desired view. |
Im using
layoutManager.setPostLayoutListener(new CarouselZoomPostLayoutListener());
But it is giving me a spacing like this between the center item & 1st right, 1st left like this
How to reduce the gap ?
Regards,
Sasank
The text was updated successfully, but these errors were encountered: