Closed Sammekl closed 6 years ago
Not an issue but in the future try to avoid the excessive formatting, you picked up a few unrelated lines.
Only thing I would like changed is the function name. Clamp is the appropriate naming for limiting a number between two bounds.
Hi,
Thanks for the reply. The formatting was a mistake caused by my pre-commit hook. Couldn't find the right word for clamping haha.
Will adjust my PR this sunday!
This issue is quite specific to our project. We use a continuous scrolling ViewPager with an infinite amount of pages.
Somehow the position retrieved in the 'transformPage' method exceed the boundaries on Android 4. This causes messed up animations where the wrong view animated which causes you to get stuck.
This fix makes sure that the position is always within it's boundaries and does not change any behaviour for working implementations.