Mediaplayer progress update to seekbar not smooth?

前端 未结 6 2065
情话喂你
情话喂你 2021-02-01 07:00

I am working on an app with recorder and player. I am using mediaplayer to play the recorded .wav file and meantime I want to update to a seekbar. Everything is working fine But

6条回答
  •  渐次进展
    2021-02-01 07:28

    The problem you're experiencing has to do with the way Android's SeekBar is designed/implemented. While it functions very well, you're limited by a combination of segments used (i.e. seekbar.setMax(int)) and the delay time of your Handler.

    That being said, I subclassed SeekBar to make my own SmoothSeekBar that uses ViewPropertyAnimators instead of a Handler.

    Check it out here: https://github.com/Indatus/Android-SmoothSeekBar

提交回复
热议问题