【发布时间】:2023-01-21 21:37:20
【问题描述】:
现在,我正在使用 CountdownCircleTimer 作为我的“进度条”,但需要一个向上计数而不是向下计数的。
<CountdownCircleTimer
isPlaying={progressCircle}
size={74}
strokeWidth={5}
duration={60}
colors={[["#000000", .001], [feedScreen ? "#F777B1" : "#64A6EC", .999]]}
trailColor={"transparent"}
>
<TouchableOpacity
style={tw.style(`rounded-full overflow-hidden justify-center items-center`, {
width: 62,
height: 62,
backgroundColor: "#000000",
})}
onPress={(e) => onPress(e)}
>
{children}
</TouchableOpacity>
</CountdownCircleTimer>
我正在尝试实现 CircularProgress 组件,但它隐藏了图像/按钮。顶部是上图中旧的倒数计时器,底部是新的圆形进度条,隐藏了图像/按钮。
<CircularProgress
value={duration}
delay={progressCircle}
radius={37}
activeStrokeWidth={5}
activeStrokeColor={feedScreen ? "#F777B1" : "#64A6EC"}
textColor={'transparent'}
>
<TouchableOpacity
style={tw.style(`rounded-full overflow-hidden justify-center items-center`, {
width: 62,
height: 62,
backgroundColor: "#000000",
})}
onPress={(e) => onPress(e)}
>
{children}
</TouchableOpacity>
</CircularProgress>
我如何将图像和按钮放在中间,就像我对倒计时通告所做的那样?
【问题讨论】:
标签: react-native