react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[Android] Nested ScrollView won't scroll

Open mattds opened this issue 11 years ago • 5 comments

Hi team, it seems that a nested ScrollView won't scroll when running on Android but is able to scroll on iOS. On android it seems only possible to scroll the outer scrollview at the moment.

mattds avatar Sep 23 '15 13:09 mattds

KP, @krzysztof had some ideas about how this can be done.

andreicoman11 avatar Sep 23 '15 17:09 andreicoman11

ScrollView in JS just maps to a regular scroll view android component. Android by default doesn't support that. If you'd like to use that you'd need to wrap another android component that is capable of doing so: https://developer.android.com/reference/android/support/v4/widget/NestedScrollView.html Here are some instructions on how to wrap custom components on android: http://facebook.github.io/react-native/docs/native-components-android.html#content

kmagiera avatar Sep 24 '15 13:09 kmagiera

Thanks, I will use a wrapped NestedScrollView then as suggested.

mattds avatar Sep 24 '15 17:09 mattds

to @kmagiera, @mattds : Could you please provide some example code for implementing NestedScrollView to react-native?

aferust avatar Aug 18 '16 17:08 aferust

Because i'm not java/android programmer. For me, the solution is using this package https://www.npmjs.com/package/react-native-nested-scroll-view and the example https://github.com/cesardeazevedo/react-native-collapsing-toolbar

ikhsanalatsary avatar Oct 04 '17 06:10 ikhsanalatsary