rnr
react-native-recycler-listview
npm i react-native-recycler-listview
rnr

react-native-recycler-listview

Implementation steps

by Ramesh Vishnoi

0.1.0 (see all)TypeScript:Not Found
npm i react-native-recycler-listview
Readme

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

import ListViewCustom from 'react-native-recycler-listview';

constructor(props) {
      super(props);
      var array = [];
      for(var i  = 0; i < 1000; i++){
        array.push({"title":"Title","subtitle":"subtiles"});
      }
      this.state = {
        dataSource:{"names": array}
      };
    }

render() {
  return (
    <View style={styles.container}>
      <ListViewCustom
      src={this.state.dataSource}
      customStyle={{"fontSize":"12","padding":"0","fontColor":"#ff6600"}}
      style={{flex:1,width:Dimensions.get('window').width,padding:0,margin:0}}>
      </ListViewCustom>
    </View>
  );
}

Downloads/wk

1

GitHub Stars

29

LAST COMMIT

5yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.1.0
latest
6yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate