【发布时间】:2020-09-12 19:38:30
【问题描述】:
我需要 soundcloud 之类的进度条(指针固定在中心)Like This
我尝试使用React Native Slider,但无法在中心固定
function TrackProgres() {
const bufferedPosition = 0
const duration = 600
return (
<ScrollView horizontal={true}>
<ImageBackground source={require('../../../../assets/images/sound.png')} style={{width:550, height: 40,zIndex:-1,left: 50,marginRight: -50 }} imageStyle={{resizeMode: 'repeat'}}>
<Slider
style={{width: 550}}
value={bufferedPosition}
maximumValue={duration}
minimumTrackTintColor="#292b2c"
maximumTrackTintColor="#292b2c"
thumbStyle={styles.thumb}
trackStyle={styles.track}
onValueChange={(value) => seekTo(value)}
/>
</ImageBackground>
</ScrollView>
)
【问题讨论】:
-
你能添加一些代码吗?
-
是的@tudor.gergely 我添加了代码请检查
标签: reactjs react-native progress-bar audio-player