react-native-amap3d icon indicating copy to clipboard operation
react-native-amap3d copied to clipboard

安卓scrollview包含地图控件,上下滑动的时候手势冲突

Open zhijianzhang opened this issue 6 years ago • 6 comments

安卓scrollview包含地图控件,上下滑动的时候手势冲突 代码结构如下 <ScrollView style={{flex:1}} scrollEventThrottle={50}> <MapView showsIndoorMap showsCompass={false} zoomLevel={15} coordinate={{ latitude: this.state.latitudeChoose?this.state.latitudeChoose:this.state.latitude, longitude: this.state.longitudeChoose?this.state.longitudeChoose:this.state.longitude, }} style={styles.map}> <MapView.Marker title='我在这里' coordinate={{ latitude: this.state.latitude, longitude: this.state.longitude, }} > </MapView.Marker>

zhijianzhang avatar Nov 06 '19 03:11 zhijianzhang

请问解决了吗?遇到了同样的问题

chenyumiao avatar Mar 19 '20 02:03 chenyumiao

没有,后面调整了UI

------------------ 原始邮件 ------------------ 发件人: "淡淡蓝蓝"<[email protected]>; 发送时间: 2020年3月19日(星期四) 上午10:36 收件人: "qiuxiang/react-native-amap3d"<[email protected]>; 抄送: "张志坚"<[email protected]>; "Author"<[email protected]>; 主题: Re: [qiuxiang/react-native-amap3d] 安卓scrollview包含地图控件,上下滑动的时候手势冲突 (#565)

请问解决了吗?遇到了同样的问题

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

zhijianzhang avatar Mar 19 '20 03:03 zhijianzhang

好的,我也调整一下ui试试

chenyumiao avatar Mar 19 '20 03:03 chenyumiao

我也遇到了 可以在不调整 UI 的情况下解决吗

Versus2017 avatar May 01 '20 17:05 Versus2017

我也遇到了 可以在不调整 UI 的情况下解决吗

你好,最后用react-native的PanResponder解决了,阻止事件的冒泡。在 componentWillMount(){ this._gestureHandlers = PanResponder.create({ onStartShouldSetPanResponder: (evt, gestureState) => true, onStartShouldSetPanResponderCapture: (evt, gestureState) => true, onMoveShouldSetPanResponder: (evt, gestureState) => true, onMoveShouldSetPanResponderCapture: (evt, gestureState) => true, onPanResponderTerminationRequest: (evt, gestureState) => true, }); } 然后在MapView中 <MapView {...this._gestureHandlers.panHandlers}
..../>

chenyumiao avatar May 09 '20 09:05 chenyumiao

@chenyumiao 谢谢 真的可以

sunshine8624 avatar Feb 12 '25 09:02 sunshine8624