Rename PullToRefreshLayoutAndroid -> PullToRefreshViewAndroid
Summary: The naming "Layout" is an Android-specific thing and not useful in JS. Let's stay consistent with naming like "ScrollView", "MapView" etc. public Reviewed By: bestander Differential Revision: D2723163 fb-gh-sync-id: 6b86e5a649254c41e9d6b0ef6f1fe2ff4b9f3e9a
This commit is contained in:
parent
02ded6d0bb
commit
611e0619ca
|
@ -18,7 +18,7 @@ const React = require('react-native');
|
||||||
const {
|
const {
|
||||||
ScrollView,
|
ScrollView,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
PullToRefreshLayoutAndroid,
|
PullToRefreshViewAndroid,
|
||||||
Text,
|
Text,
|
||||||
TouchableWithoutFeedback,
|
TouchableWithoutFeedback,
|
||||||
View,
|
View,
|
||||||
|
@ -61,9 +61,9 @@ const Row = React.createClass({
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const PullToRefreshLayoutAndroidExample = React.createClass({
|
const PullToRefreshViewAndroidExample = React.createClass({
|
||||||
statics: {
|
statics: {
|
||||||
title: '<PullToRefreshLayoutAndroid>',
|
title: '<PullToRefreshViewAndroid>',
|
||||||
description: 'Container that adds pull-to-refresh support to its child view.'
|
description: 'Container that adds pull-to-refresh support to its child view.'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ const PullToRefreshLayoutAndroidExample = React.createClass({
|
||||||
return <Row data={row} onClick={this._onClick}/>;
|
return <Row data={row} onClick={this._onClick}/>;
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
<PullToRefreshLayoutAndroid
|
<PullToRefreshViewAndroid
|
||||||
style={styles.layout}
|
style={styles.layout}
|
||||||
refreshing={this.state.isRefreshing}
|
refreshing={this.state.isRefreshing}
|
||||||
onRefresh={this._onRefresh}
|
onRefresh={this._onRefresh}
|
||||||
|
@ -98,7 +98,7 @@ const PullToRefreshLayoutAndroidExample = React.createClass({
|
||||||
<ScrollView style={styles.scrollview}>
|
<ScrollView style={styles.scrollview}>
|
||||||
{rows}
|
{rows}
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</PullToRefreshLayoutAndroid>
|
</PullToRefreshViewAndroid>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -124,4 +124,4 @@ const PullToRefreshLayoutAndroidExample = React.createClass({
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
module.exports = PullToRefreshLayoutAndroidExample;
|
module.exports = PullToRefreshViewAndroidExample;
|
|
@ -27,7 +27,7 @@ var COMPONENTS = [
|
||||||
require('./ProgressBarAndroidExample'),
|
require('./ProgressBarAndroidExample'),
|
||||||
require('./ScrollViewSimpleExample'),
|
require('./ScrollViewSimpleExample'),
|
||||||
require('./SwitchAndroidExample'),
|
require('./SwitchAndroidExample'),
|
||||||
require('./PullToRefreshLayoutAndroidExample.android'),
|
require('./PullToRefreshViewAndroidExample.android'),
|
||||||
require('./TextExample.android'),
|
require('./TextExample.android'),
|
||||||
require('./TextInputExample.android'),
|
require('./TextInputExample.android'),
|
||||||
require('./ToolbarAndroidExample'),
|
require('./ToolbarAndroidExample'),
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
*
|
*
|
||||||
* @providesModule PullToRefreshLayoutAndroid
|
* @providesModule PullToRefreshViewAndroid
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ var NATIVE_REF = 'native_swiperefreshlayout';
|
||||||
* React view that supports a single scrollable child view (e.g. `ScrollView`). When this child
|
* React view that supports a single scrollable child view (e.g. `ScrollView`). When this child
|
||||||
* view is at `scrollY: 0`, swiping down triggers an `onRefresh` event.
|
* view is at `scrollY: 0`, swiping down triggers an `onRefresh` event.
|
||||||
*/
|
*/
|
||||||
var PullToRefreshLayoutAndroid = React.createClass({
|
var PullToRefreshViewAndroid = React.createClass({
|
||||||
statics: {
|
statics: {
|
||||||
SIZE: RefreshLayoutConsts.SIZE,
|
SIZE: RefreshLayoutConsts.SIZE,
|
||||||
},
|
},
|
||||||
|
@ -48,7 +48,7 @@ var PullToRefreshLayoutAndroid = React.createClass({
|
||||||
*/
|
*/
|
||||||
refreshing: React.PropTypes.bool,
|
refreshing: React.PropTypes.bool,
|
||||||
/**
|
/**
|
||||||
* Size of the refresh indicator, see PullToRefreshLayoutAndroid.SIZE
|
* Size of the refresh indicator, see PullToRefreshViewAndroid.SIZE
|
||||||
*/
|
*/
|
||||||
size: React.PropTypes.oneOf(RefreshLayoutConsts.SIZE.DEFAULT, RefreshLayoutConsts.SIZE.LARGE),
|
size: React.PropTypes.oneOf(RefreshLayoutConsts.SIZE.DEFAULT, RefreshLayoutConsts.SIZE.LARGE),
|
||||||
},
|
},
|
||||||
|
@ -81,7 +81,7 @@ var PullToRefreshLayoutAndroid = React.createClass({
|
||||||
|
|
||||||
var NativePullToRefresh = requireNativeComponent(
|
var NativePullToRefresh = requireNativeComponent(
|
||||||
'AndroidSwipeRefreshLayout',
|
'AndroidSwipeRefreshLayout',
|
||||||
PullToRefreshLayoutAndroid
|
PullToRefreshViewAndroid
|
||||||
);
|
);
|
||||||
|
|
||||||
module.exports = PullToRefreshLayoutAndroid;
|
module.exports = PullToRefreshViewAndroid;
|
|
@ -6,7 +6,7 @@
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
*
|
*
|
||||||
* @providesModule PullToRefreshLayoutAndroid
|
* @providesModule PullToRefreshViewAndroid
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
|
@ -37,7 +37,7 @@ var ReactNative = Object.assign(Object.create(require('React')), {
|
||||||
SliderIOS: require('SliderIOS'),
|
SliderIOS: require('SliderIOS'),
|
||||||
SnapshotViewIOS: require('SnapshotViewIOS'),
|
SnapshotViewIOS: require('SnapshotViewIOS'),
|
||||||
Switch: require('Switch'),
|
Switch: require('Switch'),
|
||||||
PullToRefreshLayoutAndroid: require('PullToRefreshLayoutAndroid'),
|
PullToRefreshViewAndroid: require('PullToRefreshViewAndroid'),
|
||||||
SwitchAndroid: require('SwitchAndroid'),
|
SwitchAndroid: require('SwitchAndroid'),
|
||||||
SwitchIOS: require('SwitchIOS'),
|
SwitchIOS: require('SwitchIOS'),
|
||||||
TabBarIOS: require('TabBarIOS'),
|
TabBarIOS: require('TabBarIOS'),
|
||||||
|
|
Loading…
Reference in New Issue