我试图在Android设备上使用ScrollView的onResponderRelease事件,但它不能正常工作.像这样的代码:
<ScrollView
onResponderRelease = {()=>{console.log('release')}}
/>
Run Code Online (Sandbox Code Playgroud)
我看到很多反应原生的lib都像这样使用这个api.它支持android平台吗?
小智 0
是的,它有这样的问题 - 您可以阅读有关此的更多信息https://github.com/facebook/react-native/issues/9447
尝试使用“onMomentumScrollEnd”,在某些情况下它会完全按照您的期望进行:
<ScrollView
onMomentumScrollEnd = {()=>{console.log('release on Android')}}
onResponderRelease = {()=>{console.log('release on IOS')}}
/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
577 次 |
| 最近记录: |