mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-18 12:12:15 +08:00
Remove deprecated PullToRefreshViewAndroid and onRefreshStart / endRefreshing
Summary: Removes the deprecated APIs that were replaced by `RefreshControl`. Those API have been deprecated for a while already so I think it's fine to remove them at this point. Also ported the `SwipeRefreshLayoutTestModule` test to use `RefreshControl` instead of `PullToRefreshViewAndroid`. **Test plan (required)** Made sure no references are left in the codebase to `PullToRefreshViewAndroid`, `onRefreshStart` and `endRefreshing`. Tested that `ScrollView` examples in UIExplorer still work properly. Check that the `SwipeRefreshLayoutTestModule` passes on CI. Closes https://github.com/facebook/react-native/pull/7447 Reviewed By: mkonicek Differential Revision: D3292391 Pulled By: bestander fbshipit-source-id: 27eb2443861e04a9f7319586ce2ada381b714d47
This commit is contained in:
committed by
Facebook Github Bot 1
parent
18d6d85320
commit
a71a9efe96
@@ -15,7 +15,7 @@ var BatchedBridge = require('BatchedBridge');
|
||||
var React = require('React');
|
||||
var RecordingModule = require('NativeModules').SwipeRefreshLayoutRecordingModule;
|
||||
var ScrollView = require('ScrollView');
|
||||
var PullToRefreshViewAndroid = require('PullToRefreshViewAndroid');
|
||||
var RefreshControl = require('RefreshControl');
|
||||
var Text = require('Text');
|
||||
var TouchableWithoutFeedback = require('TouchableWithoutFeedback');
|
||||
var View = require('View');
|
||||
@@ -62,13 +62,17 @@ var SwipeRefreshLayoutTestApp = React.createClass({
|
||||
rows.push(<Row key={i} />);
|
||||
}
|
||||
return (
|
||||
<PullToRefreshViewAndroid
|
||||
<ScrollView
|
||||
style={{flex: 1}}
|
||||
onRefresh={() => RecordingModule.onRefresh()}>
|
||||
<ScrollView style={{flex: 1}}>
|
||||
{rows}
|
||||
</ScrollView>
|
||||
</PullToRefreshViewAndroid>
|
||||
refreshControl={
|
||||
<RefreshControl
|
||||
style={{flex: 1}}
|
||||
refreshing={false}
|
||||
onRefresh={() => RecordingModule.onRefresh()}
|
||||
/>
|
||||
}>
|
||||
{rows}
|
||||
</ScrollView>
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user