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
Fix ScrollView
interactions with Android's CoordinatorLayout
#44099
base: main
Are you sure you want to change the base?
Fix ScrollView
interactions with Android's CoordinatorLayout
#44099
Conversation
ScrollView
interactions with Android CoordinatorLayout
ScrollView
interactions with Android CoordinatorLayout
ScrollView
interactions with Android CoordinatorLayout
ScrollView
interactions with Android's CoordinatorLayout
I also experimented with integrating CoordinatorLayout in RN screens previously and this was a needed change to make it work. |
I got the If you set |
Thanks for the PR! I'd be inclined to not switch to The other suggestions made here make sense, and would be happy look at a PR that fixes the issue of missing event when scroll view content is less than the scroll view height. |
I would love some testing guidance (maybe issues with behaviour I should put particular emphasis to test?) & more precise description of what do I need to provide you with to change this inclination (if thats feasible). Right now I haven't noticed any unusual behaviour after applying suggested changes (beside fixed interactions with CoordinatorLayout) Here's potentially useful diff of As for attempts to patch the implementation w/o inheriting from |
I think argument for |
Summary:
Hello, I'm recently researching & implementing native material 3 bottom sheets, toolbars etc. and hitting the wall with various interactions with react-native's
ScrollView
. Here's one example that's documented on SO: link, but there at least few others related to gestures & dragging (undraggable bottom sheet whenscrollViewContentLength < scrollViewHeight
, happy to elaborate here). This comes down to the fact, that standardandroid.widget.ScrollView
does not work well withCoordinatorLayout
. Therefore I'm coming forward with question whether you would consider inheriting afterandroidx.core.widget.NestedScrollView
which solves aforementioned issues (and mostlikely many others related to interaction withCoordinatorLayout
). I want to point out that even Android docs & source code suggest to useNestedScrollView
for vertical scrolling in lieu ofScrollView
.Happy to iterate here, would love some guidance especially in testing. I'm also open for implementing
NestedScrollingChild
/NestedScrollingParent
/ ... interfaces if you don't think change in inheritance chain is possible.Changelog:
[ANDROID] [FIXED] -
ReactScrollView
interactions withCoordinatorLayout
Test Plan: