diff --git a/Examples/UIExplorer/ListViewExample.js b/Examples/UIExplorer/ListViewExample.js index 6e18c6fb6..420ed6ef7 100644 --- a/Examples/UIExplorer/ListViewExample.js +++ b/Examples/UIExplorer/ListViewExample.js @@ -21,6 +21,7 @@ var { ListView, TouchableHighlight, StyleSheet, + RecyclerViewBackedScrollView, Text, View, } = React; @@ -55,6 +56,7 @@ var ListViewSimpleExample = React.createClass({ } /> ); @@ -62,9 +64,7 @@ var ListViewSimpleExample = React.createClass({ _renderRow: function(rowData: string, sectionID: number, rowID: number) { var rowHash = Math.abs(hashCode(rowData)); - var imgSource = { - uri: THUMB_URLS[rowHash % THUMB_URLS.length], - }; + var imgSource = THUMB_URLS[rowHash % THUMB_URLS.length]; return ( this._pressRow(rowID)}> @@ -98,18 +98,18 @@ var ListViewSimpleExample = React.createClass({ }); var THUMB_URLS = [ - 'Thumbnails/like.png', - 'Thumbnails/dislike.png', - 'Thumbnails/call.png', - 'Thumbnails/fist.png', - 'Thumbnails/bandaged.png', - 'Thumbnails/flowers.png', - 'Thumbnails/heart.png', - 'Thumbnails/liking.png', - 'Thumbnails/party.png', - 'Thumbnails/poke.png', - 'Thumbnails/superlike.png', - 'Thumbnails/victory.png', + require('./Thumbnails/like.png'), + require('./Thumbnails/dislike.png'), + require('./Thumbnails/call.png'), + require('./Thumbnails/fist.png'), + require('./Thumbnails/bandaged.png'), + require('./Thumbnails/flowers.png'), + require('./Thumbnails/heart.png'), + require('./Thumbnails/liking.png'), + require('./Thumbnails/party.png'), + require('./Thumbnails/poke.png'), + require('./Thumbnails/superlike.png'), + require('./Thumbnails/victory.png'), ]; var LOREM_IPSUM = 'Lorem ipsum dolor sit amet, ius ad pertinax oportere accommodare, an vix civibus corrumpit referrentur. Te nam case ludus inciderint, te mea facilisi adipiscing. Sea id integre luptatum. In tota sale consequuntur nec. Erat ocurreret mei ei. Eu paulo sapientem vulputate est, vel an accusam intellegam interesset. Nam eu stet pericula reprimique, ea vim illud modus, putant invidunt reprehendunt ne qui.'; diff --git a/Examples/UIExplorer/UIExplorerList.android.js b/Examples/UIExplorer/UIExplorerList.android.js index 327bf457b..7aa70c516 100644 --- a/Examples/UIExplorer/UIExplorerList.android.js +++ b/Examples/UIExplorer/UIExplorerList.android.js @@ -24,6 +24,7 @@ var UIExplorerListBase = require('./UIExplorerListBase'); var COMPONENTS = [ require('./ImageExample'), + require('./ListViewExample'), require('./ProgressBarAndroidExample'), require('./ScrollViewSimpleExample'), require('./SwitchAndroidExample'), diff --git a/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.ios.js b/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.ios.js index 651fac1de..a84377e54 100644 --- a/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.ios.js +++ b/Libraries/Components/ScrollView/RecyclerViewBackedScrollView.ios.js @@ -5,4 +5,4 @@ */ 'use strict'; -module.exports = require('UnimplementedView'); +module.exports = require('ScrollView'); diff --git a/Libraries/react-native/react-native.js b/Libraries/react-native/react-native.js index 130c4439a..68876a712 100644 --- a/Libraries/react-native/react-native.js +++ b/Libraries/react-native/react-native.js @@ -32,6 +32,7 @@ var ReactNative = { get SnapshotViewIOS() { return require('SnapshotViewIOS'); }, get Switch() { return require('Switch'); }, get PullToRefreshViewAndroid() { return require('PullToRefreshViewAndroid'); }, + get RecyclerViewBackedScrollView() { return require('RecyclerViewBackedScrollView'); }, get SwitchAndroid() { return require('SwitchAndroid'); }, get SwitchIOS() { return require('SwitchIOS'); }, get TabBarIOS() { return require('TabBarIOS'); }, @@ -101,7 +102,7 @@ var ReactNative = { get createFragment() { return require('ReactFragment').create; }, get update() { return require('update'); }, }, - + // Note: this must be placed last to prevent eager // evaluation of the getter-wrapped submodules above ...require('React'), @@ -109,11 +110,11 @@ var ReactNative = { if (__DEV__) { Object.defineProperty(ReactNative.addons, 'Perf', { - enumerable: true, + enumerable: true, get: () => require('ReactDefaultPerf'), }); Object.defineProperty(ReactNative.addons, 'TestUtils', { - enumerable: true, + enumerable: true, get: () => require('ReactTestUtils'), }); } diff --git a/Libraries/react-native/react-native.js.flow b/Libraries/react-native/react-native.js.flow index d6c4aac73..c3d841e5a 100644 --- a/Libraries/react-native/react-native.js.flow +++ b/Libraries/react-native/react-native.js.flow @@ -44,6 +44,7 @@ var ReactNative = Object.assign(Object.create(require('React')), { SnapshotViewIOS: require('SnapshotViewIOS'), Switch: require('Switch'), PullToRefreshViewAndroid: require('PullToRefreshViewAndroid'), + RecyclerViewBackedScrollView: require('RecyclerViewBackedScrollView'), SwitchAndroid: require('SwitchAndroid'), SwitchIOS: require('SwitchIOS'), TabBarIOS: require('TabBarIOS'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java b/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java index 51ca4de44..6cd3e9eff 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +++ b/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java @@ -30,6 +30,7 @@ import com.facebook.react.uimanager.ViewManager; import com.facebook.react.views.drawer.ReactDrawerLayoutManager; import com.facebook.react.views.image.ReactImageManager; import com.facebook.react.views.progressbar.ReactProgressBarViewManager; +import com.facebook.react.views.recyclerview.RecyclerViewBackedScrollViewManager; import com.facebook.react.views.scroll.ReactHorizontalScrollViewManager; import com.facebook.react.views.scroll.ReactScrollViewManager; import com.facebook.react.views.switchview.ReactSwitchManager; @@ -78,6 +79,7 @@ public class MainReactPackage implements ReactPackage { new ReactImageManager(), new ReactProgressBarViewManager(), new ReactRawTextManager(), + new RecyclerViewBackedScrollViewManager(), new ReactScrollViewManager(), new ReactSwitchManager(), new ReactTextInputManager(),