bartgryszko / react-native-circular-progress

React Native component for creating animated, circular progress with ReactART
MIT License
2.16k stars 425 forks source link

Timer as "fill" value #240

Open dr-star opened 4 years ago

dr-star commented 4 years ago

Hello all, My issue is that, the progress seems finish before the actual time. There is a way to access the remaining time?

How I have configured the increase time: setInterval(() => { if (!this.state.stopTimer) { this.setState({ currentTime: subSeconds(this.state.currentTime, 1), }); } }, 1000); How I have configured the progress: ` <AnimatedCircularProgress size={250} width={12} fill={100} duration={0} style={styles.progress} tintColor="#b09838" onAnimationComplete={() => this.animationComplete()} backgroundColor="#3d5875" ref={ref => (this._circularProgressRef = ref)}> {fill => (

{format(this.state.currentTime, 'mm:ss')}
            )}
          </AnimatedCircularProgress>`

Thanks in advance for your time 😄

AMBTech commented 2 years ago

I'm also having the same issue, if I run interval for 1 minutes, the progress fills completely around 5 seconds before timeout. circularProgress.current.animate(100, (60 * 1000), Easing.linear); Any solution? Thanks