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 {
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
PullToRefreshLayoutAndroid,
|
||||
PullToRefreshViewAndroid,
|
||||
Text,
|
||||
TouchableWithoutFeedback,
|
||||
View,
|
||||
|
@ -61,9 +61,9 @@ const Row = React.createClass({
|
|||
);
|
||||
},
|
||||
});
|
||||
const PullToRefreshLayoutAndroidExample = React.createClass({
|
||||
const PullToRefreshViewAndroidExample = React.createClass({
|
||||
statics: {
|
||||
title: '<PullToRefreshLayoutAndroid>',
|
||||
title: '<PullToRefreshViewAndroid>',
|
||||
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 (
|
||||
<PullToRefreshLayoutAndroid
|
||||
<PullToRefreshViewAndroid
|
||||
style={styles.layout}
|
||||
refreshing={this.state.isRefreshing}
|
||||
onRefresh={this._onRefresh}
|
||||
|
@ -98,7 +98,7 @@ const PullToRefreshLayoutAndroidExample = React.createClass({
|
|||
<ScrollView style={styles.scrollview}>
|
||||
{rows}
|
||||
</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('./ScrollViewSimpleExample'),
|
||||
require('./SwitchAndroidExample'),
|
||||
require('./PullToRefreshLayoutAndroidExample.android'),
|
||||
require('./PullToRefreshViewAndroidExample.android'),
|
||||
require('./TextExample.android'),
|
||||
require('./TextInputExample.android'),
|
||||
require('./ToolbarAndroidExample'),
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* 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.
|
||||
*
|
||||
* @providesModule PullToRefreshLayoutAndroid
|
||||
* @providesModule PullToRefreshViewAndroid
|
||||
*/
|
||||
'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
|
||||
* view is at `scrollY: 0`, swiping down triggers an `onRefresh` event.
|
||||
*/
|
||||
var PullToRefreshLayoutAndroid = React.createClass({
|
||||
var PullToRefreshViewAndroid = React.createClass({
|
||||
statics: {
|
||||
SIZE: RefreshLayoutConsts.SIZE,
|
||||
},
|
||||
|
@ -48,7 +48,7 @@ var PullToRefreshLayoutAndroid = React.createClass({
|
|||
*/
|
||||
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),
|
||||
},
|
||||
|
@ -81,7 +81,7 @@ var PullToRefreshLayoutAndroid = React.createClass({
|
|||
|
||||
var NativePullToRefresh = requireNativeComponent(
|
||||
'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
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @providesModule PullToRefreshLayoutAndroid
|
||||
* @providesModule PullToRefreshViewAndroid
|
||||
*/
|
||||
'use strict';
|
||||
|
|
@ -37,7 +37,7 @@ var ReactNative = Object.assign(Object.create(require('React')), {
|
|||
SliderIOS: require('SliderIOS'),
|
||||
SnapshotViewIOS: require('SnapshotViewIOS'),
|
||||
Switch: require('Switch'),
|
||||
PullToRefreshLayoutAndroid: require('PullToRefreshLayoutAndroid'),
|
||||
PullToRefreshViewAndroid: require('PullToRefreshViewAndroid'),
|
||||
SwitchAndroid: require('SwitchAndroid'),
|
||||
SwitchIOS: require('SwitchIOS'),
|
||||
TabBarIOS: require('TabBarIOS'),
|
||||
|
|
Loading…
Reference in New Issue