mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-13 22:29:45 +08:00
Allow customized refreshControl in ScrollView for Android
Summary: Original Android's refreshControl in ScrollView is tightly coupled with AndroidSwipeRefreshLayout. If someone use `ref=` for RefreshControl in ScrollView, it does nothing since RefreshControl in Android return null. This change allows customized RefreshControl especially for `ref=` as well as making ScrollView's code clearer. Closes https://github.com/facebook/react-native/pull/5623 Reviewed By: svcscm Differential Revision: D2890072 Pulled By: nicklockwood fb-gh-sync-id: a8fc7746bcc050a6e46fedf3583979f4cb9021b6
This commit is contained in:
committed by
facebook-github-bot-1
parent
a0bed63f13
commit
6d65a90017
@@ -16,7 +16,6 @@ var RefreshLayoutConsts = require('UIManager').AndroidSwipeRefreshLayout.Constan
|
||||
var View = require('View');
|
||||
|
||||
var onlyChild = require('onlyChild');
|
||||
var processColor = require('processColor');
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
var NATIVE_REF = 'native_swiperefreshlayout';
|
||||
@@ -68,7 +67,7 @@ var PullToRefreshViewAndroid = React.createClass({
|
||||
render: function() {
|
||||
return (
|
||||
<NativePullToRefresh
|
||||
colors={this.props.colors && this.props.colors.map(processColor)}
|
||||
colors={this.props.colors}
|
||||
enabled={this.props.enabled}
|
||||
onRefresh={this._onRefresh}
|
||||
progressBackgroundColor={this.props.progressBackgroundColor}
|
||||
|
||||
Reference in New Issue
Block a user