-
Notifications
You must be signed in to change notification settings - Fork 86
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
Strange behaviour #4
Comments
I also found the gesture detection to be quite sensitive to vertical swipes compared to horizontal. I didn't have a look into how to tweak this. Can you find out how other nested scrolling children implement the increased threshold for vertical scrolling when in a view pager? We might be able to learn from existing code. |
+1 |
Any progress in this issue? Thanks in advance. |
Yeah, it's easy to fix it. I just add some additional conditions in onInterceptTouchEvent.
After
mInitialY and initialX should be global variable. |
A pull request with the necessary changes would be much appreciated. |
Ok, I'll do it later ) |
Thanks @Zanexess, yes, that pull request would be great |
Okay it's sad, but I find out that my solution works only in my specific case. Meanwhile you can use something like I did in pull request to make it work for you. |
It seems to me that when the viewpager sends a cancel event when it starts scrolling between pages, which triggers the dialog to expand/close. My quick work around for this issue was this to override the onPageScrollStateChanged method of the viewpager listener and add this line: |
I was just tackling this issue in our fork (which supports an intermediate anchor state). It required tweaking the code that calculates the
This results in relatively pleasing behaviour. You can find the diff @ trafi/anchor-bottom-sheet-behavior@0.9.1-alpha...0.10-alpha |
Maybe the sensitivity of ViewPagerBottomSheet not only depends on the dis of Y, but also depends on the velocity of Y. So the appropriate way to intercept the touch event would be something like this:
Just compare the distance and the velocity between X and Y, it seems to work for me. |
New version 0.0.6 seems to resolve this. Thank you @kozmi55 |
Thanks a lot for this library!
But there is a little problem. When i try to swipe ViewPager's fragment, it often close bottom sheet;
To change fragment of viewpager i should move finger right on x axis without any y movements.
Is there any workaround to intercept this action to fix this strange behavior?
The text was updated successfully, but these errors were encountered: