Open marynovskyi opened 7 years ago
Same problem here! It should be fixed!
I have committed some changes, please look at them and tell me if it persist. The BottomSheet always has to stop on anchor point coming from collapsed or expanded mode. I'm gonna try adding a threshold when it reaches collapsed, anchor or expanded state.
Thank you! However I didn't noticed any changes. As an example in google maps when I drag bottom sheet from the bottom of the screen to the top without releasing finger from screen it always stops at anchor point! But in this lib if I drag bottom sheet without releasing my finger I get always STATE_EXPANDED
Yeah I know what are you talking about is like a threshold. I'm gonna add it later on this month.
I believe my fix to Issue #26 fixes this issue as well.
@vit001 rocks! he did it
There are some problems: I made that when user clicks back button bottom sheet should collapse. It is working but when bottom sheet is fully expanded and when I press back button and then when I touch (just a little bit) bottom sheet it immediately expands to (ANCHOR_POINT) without any animation
Hi - how do you collapse the bottom sheet with back button? Can you post code?
On Jan 23, 2017 10:38 AM, "deiauk" notifications@github.com wrote:
I will add video link here https://vimeo.com/200703338 There are some problems: I made that when user clicks back button bottom sheet should collapse. It is working but when bottom sheet is fully expanded and when I press back button and then when I touch (just a little bit) bottom sheet it immediately expands to (ANCHOR_POINT) without any animation (see video)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/miguelhincapie/CustomBottomSheetBehavior/issues/15#issuecomment-274577178, or mute the thread https://github.com/notifications/unsubscribe-auth/ADoGrzHW1zpkTyBKykeubEw3Kux5ZbPiks5rVPOagaJpZM4K6ngs .
I think I know what the issue is, will fix, but please post your bottom sheet ollapse code to be sure.
On Jan 23, 2017 10:38 AM, "deiauk" notifications@github.com wrote:
I will add video link here https://vimeo.com/200703338 There are some problems: I made that when user clicks back button bottom sheet should collapse. It is working but when bottom sheet is fully expanded and when I press back button and then when I touch (just a little bit) bottom sheet it immediately expands to (ANCHOR_POINT) without any animation (see video)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/miguelhincapie/CustomBottomSheetBehavior/issues/15#issuecomment-274577178, or mute the thread https://github.com/notifications/unsubscribe-auth/ADoGrzHW1zpkTyBKykeubEw3Kux5ZbPiks5rVPOagaJpZM4K6ngs .
Hi, its just bottomSheetBehaviorGoogleMapsLike.setState(BottomSheetBehaviorGoogleMapsLike.STATE_COLLAPSED);
Can you try my fork and see if it fixes the issue? If yes, I will issue a PR.
Also, can you share your code for scrolling the bottom sheet to the top when collapsed? Thx!
@vit001 Great it works almost perfectly. Here's the code it's just one line bottomSheet.scrollTo(0, 0); however sometimes this method doesn't work.
However there's some strange behaviour. Look at this video https://vimeo.com/200729039 I think it happens when I release my finger at anchor point (try it you will see that bottomsheet never stops at anchor point)
@deiauk I cannot reproduce the behavior (bottomsheet doesn't stop at anchor) in the demo app. Does it happen only in your app, or in the demo from this lib as well?
@deiauk - OK I can reproduce it now. When you give enough fling velocity to fling from collapsed to expanded it will not stop at anchor. It seems mViewDragHelper.smoothSlideViewTo( child, child.getLeft(), anchor ) doesn't respect the anchor and keeps scrolling if it has enough momentum. It works if the fling velocity is small. I don't know how to fix it! It seems like a bug in ViewDragHelper. Any ideas?
mmm what if we try forcing it to check Dy or Y position, looking for anchor_point? But we need to know its a single event: scrolling from collapsed in one shot.
I have fixed this issue in my fork, please confirm it works for you: https://github.com/vit001/CustomBottomSheetBehavior
When set anchor point - it has very sensitive scroll. It's easy to scroll to expanded state without stoping on anchored. Can I make it less sensitive or stop when use scroll to anchored state?