Smooth Progress Bar Animation

前端 未结 9 865
鱼传尺愫
鱼传尺愫 2021-01-01 10:34

I\'m trying to implement a smooth animation for my ProgressBar, but when I increase the time (30 seconds), the animation is no longer smooth.

Example wi

9条回答
  •  清歌不尽
    2021-01-01 11:03

    You can not use the ofFloat because the ProgressBar's progress attribute doesn't accept float values, only integer ones. That is why your ProgressBar stopped progressing after going with that solution.

    As the others have said it, the correct way to do what you want is to set android:max to some big integer.

    Sorry for reviving the thread but I feel like this had to be said.

提交回复
热议问题