React native wrapper for android NestedScrollView. It's extract from react-native-bottom-sheet-behavior
$ npm install react-native-nested-scrollview
$ react-native link react-native-nested-scrollview
Edit the current files as follows.
MainApplication.java
+ import com.mohtada.nestedscrollview.NestedScrollViewPackage;
public class MainApplication extends Application implements ReactApplication {
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
+ new NestedScrollViewPackage()
);
}
}
android/app/build.gradle
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
+ compile project(':react-native-nested-scrollview')
}
android/settings.gradle
include ':app'
+ include ':react-native-nested-scrollview'
+ project(':react-native-nested-scrollview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-nested-scrollview/android')
You should use NestedScrollView
instead of ScrollView
.
import NestedScrollView from 'react-native-nested-scrollview';
render() {
return (
<NestedScrollView>
<NestedScrollView>
</NestedScrollView>
</NestedScrollView>
);
}