PanResponder with Scrollview doesn't generate onRelease event in Android #25226
Labels
API: PanResponder
Bug
Component: ScrollView
Platform: Android
Android applications.
Stale
There has been a lack of activity on this issue and it may be closed soon.
I am trying to implement an apple maps style draggable drawer for my application. UI has two views one on background and the foreground view is in the drawer at the bottom of the screen by default. We should be able to drag it a bit to top and release it to have it slide over to the top automatically.
Once the view is at the top we should be able to scroll with in the drag view and then when the scroll reaches the top position and scrolling beyond top is continued the view should come down and collapse to the bottom much like Apple Maps.
In case of iOS it works absolutely fine, I have one responder on the container and another responder on the scroll view. Once the container is at top the outer responder doest respond.Once the content is scrolled to top the inner responder will trigger the slide down animation after a threshold movement of say 10 in dy. This is handled from pan responders onPanResponderRelease event while the movement dy is handled in onPanResponderMove
How ever in case of Android this responder doesn't work. It never generates onPanResponderRelease and hence I had to hack it and put the animation into the move event itself.
React Native version:
Steps To Reproduce
https://snack.expo.io/@kishore.kondepudi/nested-responder
How ever this panResponderRelease never fires in android. Instead in order to workaround the animation had to be put into the move event itself.
Describe what you expected to happen:
The inner responder should fire onResponderRelease event after the top is reached. So that the required action can be done.
Snack, code example, or link to a repository:
https://snack.expo.io/@kishore.kondepudi/nested-responder
The text was updated successfully, but these errors were encountered: