FaridSafi / react-native-gifted-listview

✌️ ListView with pull-to-refresh and infinite scrolling for Android and iOS React-Native apps
MIT License
1.62k stars 290 forks source link

Circular indeterminate `ProgressBarAndroid` is deprecated. Use `ActivityIndicator` instead #103

Open Jamadan opened 7 years ago

Jamadan commented 7 years ago

Three warnings encountered when I initialise gifted list view.

Code: <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 enableEmptySections={true} //Removes warning on empty sections customStyles={{ paginationView: { backgroundColor: '#eee' } }} refreshableTintColor="blue"/>

1> "Warning: You are manually calling a React.PropTypes validation function for the indeterminate prop on ProgressBarAndroid. This is deprecated and will not work in production with the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."

2> "Warning: You are manually calling a React.PropTypes validation function for the indeterminate prop on AndroidProgressBar. This is deprecated and will not work in production with the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."

3> "Circular indeterminate ProgressBarAndroidis deprecated. Use ActivityIndicator instead."

Bit of a newbie to react-native. I'm following what the error is, just don't know how to address it using included components. Please advise!

Questions:

hzl123456 commented 7 years ago

i have the same warning

RatFou commented 7 years ago

You have to update the react-native-gifted-spinner node_module: `'use strict'

var React = require('react');

var { View, ActivityIndicatorIOS, ProgressBarAndroid, ActivityIndicator, Platform } = require('react-native');

var GiftedSpinner = React.createClass({

_getSpinner() { if (Platform.OS === 'android') { return ( <ActivityIndicator style={{ height: 20, }} styleAttr="Inverse" {...this.props} /> ); } else { return ( <ActivityIndicatorIOS animating={true} size="small" {...this.props} /> ); } },

render() { return (

{this._getSpinner()}
);

},

});

module.exports = GiftedSpinner;`