Use RecyclerViewBackedScrollView in groups feed on Android.

Differential Revision: D2549975

fb-gh-sync-id: 98689a58a69ce8425c695acf74701509816821ae
This commit is contained in:
Krzysztof Magiera 2015-10-16 07:43:09 -07:00 committed by facebook-github-bot-7
parent 0ed3048e39
commit 8e2ec64763
2 changed files with 8 additions and 2 deletions

View File

@ -55,7 +55,7 @@ var RecyclerViewBackedScrollView = React.createClass({
...ScrollView.propTypes,
},
mixins: [ScrollResponder.Mixin, NativeMethodsMixin],
mixins: [ScrollResponder.Mixin],
getInitialState: function() {
return this.scrollResponderMixinGetInitialState();
@ -69,6 +69,10 @@ var RecyclerViewBackedScrollView = React.createClass({
return React.findNodeHandle(this.refs[INNERVIEW]);
},
setNativeProps: function(props: Object) {
this.refs[INNERVIEW].setNativeProps(props);
},
render: function() {
var props = {
...this.props,

View File

@ -17,6 +17,7 @@ import android.view.ViewGroup;
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.common.annotations.VisibleForTesting;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.uimanager.events.NativeGestureUtil;
import com.facebook.react.views.scroll.ScrollEvent;
@ -31,7 +32,8 @@ import com.facebook.react.views.scroll.ScrollEvent;
* It works by storing all child views in an array within adapter and binding appropriate views to
* rows when requested.
*/
/*package*/ class RecyclerViewBackedScrollView extends RecyclerView {
@VisibleForTesting
public class RecyclerViewBackedScrollView extends RecyclerView {
/**
* Simple implementation of {@link ViewHolder} as it's an abstract class. The only thing we need