-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Hi all,
I think this is a bug that I have a script as below. I would like to create a parallax listview and use a view outside of listview. The view must capture all responder effect it is terminated without a call to onPanResponderTerminationRequest.
Please help me. Thank you.
componentWillMount()
{
var that = this;
this._panGesture = PanResponder.create({
onStartShouldSetPanResponder: (evt, gestureState) => true,
onMoveShouldSetPanResponder: (evt, gestureState) => true,
onStartShouldSetPanResponderCapture: (evt, gestureState) => true,
onMoveShouldSetPanResponderCapture: (evt, gestureState) => true,
onPanResponderGrant: (evt, gestureState) => {},
onShouldBlockNativeResponder: (evt, gestureState) => true,
onPanResponderReject: (evt, gestureState) => {
that._lastMoveDy = 0;
},
onPanResponderRelease: (evt, gestureState) => {
that._lastMoveDy = 0;
},
onPanResponderStart: (evt, gestureState) => {},
onPanResponderMove: (evt, gestureState) => {
that._animStyle.height = that._animStyle.height + gestureState.dy - that._lastMoveDy;
that._lastMoveDy = gestureState.dy;
that.refs.anim.setNativeProps({
style: that._animStyle,
})
},
onPanResponderEnd: (evt, gestureState) => {},
onPanResponderTerminate: (evt, gestureState) => {
that._lastMoveDy = 0;
},
onPanResponderTerminationRequest: (evt, gestureState) => {
console.log("onPanResponderTerminationRequest");
return false;
},
});
}
render() {
return (
<View
{...this._panGesture.panHandlers}
style={styles.container}
>
<Animated.View ref="anim" style={this._animStyle}>
</Animated.View>
<ListView
ref="list"
style={styles.listView}
renderRow={this.renderRow.bind(this)}
dataSource={this.state.dataSource}
/>
</View>
)
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.