-
Notifications
You must be signed in to change notification settings - Fork 367
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
How to change the scale of the on focus image. #4
Comments
Hi Giosk! |
Hi mig35, Thanks for your help 👍 |
Hi Giosk, You will use this value: itemPositionToCenterDiff. This value is int when there is no scroll and current item is in some fixed position from center. Center item is 0, right items are > 0, left are < 0. So if there is no scroll then "child 1 left" will be -1, "first image" will be 0, "child 1 right" will be 1. As soon as user start scrolling, itemPositionToCenterDiff will be a float, that indicates position of item center to full receclerview center. so if first image will be in the right of the center, it's value will be from 0 to 1 (for example 0.34f). And so on. You should write scale and transition logic for your needs. If you have any question, ask me :) |
Hi mig35, Thanks again |
Hi mig35, |
Hi brucetoo, Math.abs(itemPositionToCenterDiff) changes from 0 to (mMaxVisibleItems+1). If itemPositionToCenterDiff=0, we need function to be 1 (we don't scale view in upper way). We could use any other function to get this result, but I choose this one. |
Thanks for your explain,mig35. |
You are welcome, brucetoo |
Is it possible to change the size of the on focus image?
The difference is huge between the image and their left and right children.
By the way you did a great work!
Thanks
Giosk
The text was updated successfully, but these errors were encountered: