Status Update
Comments
ch...@google.com <ch...@google.com>
me...@gmail.com <me...@gmail.com> #2
Seeing the same issue in ModalBottomSheet from material3-android -> 1.4.0-alpha05
.
se...@google.com <se...@google.com> #3
me...@gmail.com <me...@gmail.com> #4
This is due to new motionScheme property. Previously the bug was fixed by using tween animation and starting from 1.4 spring is used again.
jo...@google.com <jo...@google.com> #5
We can either use an "effects" motion, which is not bouncy and will not cause the animation values over or under 1 and -1.
But I recall we have taken care of this problem specifically for this this component at
A few questions for the reporter:
- Can you provide some code to replicate it.
- Did you make changes to the MotionScheme default values? Did you pick
standard
orexpressive
as a motion scheme in the MaterialTheme?
Thanks
me...@gmail.com <me...@gmail.com> #6
We will provide one shortly...
me...@gmail.com <me...@gmail.com> #7
Finally, we were able to build a demo app showcasing the scrolling problem. As reported here, the React Native ScrollView
inside Jetpack Compose can only be scrolled with two fingers. There's an uncommented workaround inside the MainActivity
with a LazyColumn
that solves the two-fingers issue, but it doesn't respect the sticky header inside the React Native view. For any help with the Metro Bundler setup for running the React Native code, don't hesitate to contact me! Here's the repo:
me...@gmail.com <me...@gmail.com> #8
Did you have time to check out the demo?
Description
Jetpack Compose version: androidxComposeBom = "2024.08.00"
Jetpack Compose component used: Material3 BottomSheetScaffold, NavHostController, AndroidView
Android Studio Build: Ladybug | 2024.2.1 Patch 2
Kotlin version: "2.0.21"
Issue Title: React Native ScrollView Inside BottomSheet Requires Two-Finger Scroll Gesture in Jetpack Compose
Description: We are experiencing an issue where a
ScrollView
inside a React Native view, which is embedded within a Jetpack ComposeBottomSheet
, does not respond to the standard one-finger scroll gesture. Instead, it requires a two-finger scroll gesture to work.In our application, we use a
BottomSheet
to display a React Native view, which contains aScrollView
. However, thisScrollView
can only be scrolled with two fingers when it is inside theBottomSheet
. The same React Native view works correctly in other parts of the application where it is embedded within an XML layout and aFragment
without Jetpack Compose.Code Structure
Here's a simplified version of our code structure:
What We Have Tried
nestedScrollConnection
from theBottomSheet
to theReactNativeViewWrapper
, but this did not resolve the issue.FlatList
from thereact-native-gesture-handler
library, which is generally optimized for Android scrolling performance. However, this approach also did not improve the situation—only the two-finger gesture was still recognized by React Native.Observations
BottomSheet
only scrolls with a two-finger gesture.xml
file.Questions
BottomSheet
and React Native’sScrollView
?Request
We would appreciate any insights into why this behavior might be occurring and guidance on potential solutions. Thank you for your assistance!