Gifted ListView
A ListView with pull-to-refresh, infinite scrolling and more for Android and iOS React-Native apps
Changelog
0.0.13
- Use RefreshControl instead of own implementation for pull-to-refresh (PR @SpaceK33z)
Simple example
;; ; /** * Will be called when refreshing * Should be replaced by your own logic * @param * @param * @param */ { ; // simulating network fetching } /** * When a row is touched * @param */ { console; } /** * Render a row * @param */ { return <TouchableHighlight style=stylesrow underlayColor='#c8c7cc' onPress= this > <Text>rowData</Text> </TouchableHighlight> ; } { return <View style=stylescontainer> <View style=stylesnavBar /> <GiftedListView rowView=this_renderRowView onFetch=this_onFetch firstLoader=true // display a loader for the first fetching pagination=true // enable infinite scrolling using touch to load more refreshable=true // enable pull-to-refresh for iOS and touch-to-refresh for Android withSections=false // enable sections /> </View> ; } const styles = StyleSheet;
Advanced example
See GiftedListViewExample/example_advanced.js
Installation
npm install react-native-gifted-listview --save
Features
- Pull-to-refresh in iOS
- Touch-to-refresh in Android
- Infinite scrolling using touch to load more
- Loader for first display
- Default view when no content to display
- Customizable (see advanced example)
- Support for section header
- Pull-to-refresh in Android
License
Feel free to ask me questions on Twitter @FaridSafi !