[Android] onResponderMove nativeEvent locationX does not change
See original GitHub issueHey guys,
Running into a bug (on Android only) where locationX
of onResponderMove
never changes as you drag along the view.
var MyComponent = React.createClass({
onStartShouldSetResponder: function(e) {
return true;
},
onMoveShouldSetResponder: function(e) {
return true;
},
onResponderMove: function(e) {
var evt = e.nativeEvent;
console.log(evt.locationX);
},
render: function() {
return (
<View
style={styles.box}
onStartShouldSetResponder={this.onStartShouldSetResponder}
onMoveShouldSetResponder={this.onMoveShouldSetResponder}
onResponderMove={this.onResponderMove}>
</View>
);
}
});
var styles = StyleSheet.create({
box: {
flexDirection: 'row',
alignSelf: 'center',
width: 200,
height: 50,
backgroundColor: 'red'
}
});
React Native 0.22.0 OSX
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:28 (15 by maintainers)
Top Results From Across the Web
React Native Gesture Responder not working as expect on ...
In this article I wrote, I found that gesture responder system does not work on Android if the view has no background color....
Read more >Gesture Responder System - React Native
The gesture responder system manages the lifecycle of gestures in your app. A touch can go through several phases as the app determines...
Read more >View · React Native - GitHub Pages
On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't...
Read more >What does the Gesture Responder System do in React Native
Triggers when some other component in the app is currently responding and it cannot release. On grant the following handlers can be called...
Read more >React Native Get Clicked Location of ... - About React
To get the clicked location of touchscreen React Native provides an easy to use component called PanResponder, for both Android and IOS.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Still seeing this in 0.43.4
Still seeing in 0.35.0