react-native-recycler-listview
Custom Component for ListView in Android using RecyclerView
Installation
git clone https://github.com/rameshvishnoi90904/react-native-recycler-listview.git
step 1: In settings.gradle
include ':ReactNativeRecyclerListview'
project(':ReactNativeRecyclerListview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-recycler-listview/android')
step 2: In android/app/build.gradle
dependencies {
compile project(':ReactNativeRecyclerListview')
}
step 3: In MainApplication.java
import com.customlistview.ListViewPackage;
@Override protected List getPackages() {
return Arrays.asList(
new MainReactPackage(),
new ListViewPackage()
);
}
step 4: In index.js
; { superprops; var array = ; forvar i = 0; i < 1000; i++ array; thisstate = dataSource:"names": array ; } { return <View style=stylescontainer> <ListViewCustom src=thisstatedataSource customStyle="fontSize":"12""padding":"0""fontColor":"#ff6600" style=flex:1width:Dimensionswidthpadding:0margin:0> </ListViewCustom> </View> ;}