react-native - react native @react-native-community/slider 在 Animated.View 组件中不起作用
问题描述
在 react-native@0.64.1, @react-native-community/slider@3.0.3
我尝试使用 react native Animated 使 Slider 具有不透明过渡,但是当我这样做时,组件无法拖动。
像这样:
<Animated.View style={{opacity: this.controlBarAnimatedOpacity}} >
<Slider
style={style.videoSlider}
value={this.state.playPosition}
minimumValue={0}
maximumValue={this.state.videoFullTime}
minimumTrackTintColor={...}
maximumTrackTintColor={...}
thumbTintColor={...}
onTouchStart={() => this.handleTouchStart()}
onSlidingComplete={() => this.hanleSlidingComplete()}
onValueChange={value => this.handleValueChange(value)}
/>
</Animated.View>
我尝试了一些解决方法,例如 set pointerEvents 但没用,无法收到滑块的任何响应,有人有更复杂的问题吗?
解决方案
推荐阅读
- crystal-reports - 水晶报表显示白色背景色
- java - 键入时在 JTextPane 中格式化数学方程式
- powershell - 文件目录遍历
- c# - 如何根据包含属性名称的另一个列表从列表中获取特定属性
- c# - 注册到第二个用户控件后如何更新我的第一个用户控件中的 Datagridview
- javascript - 加载下拉值字母顺序角度6
- python - 模块“cv2.cv2”没有属性“xfeatures”
- javascript - 如何在 react-redux 中使用 thunk 中间件实现 post api 调用?
- haskell - 在 Haskell 中将数字读取为文本、tshow 和显示
- node.js - 错误:连接处于关闭状态时无法添加新命令