I'm using SeekBar in my application and when user seeks it should reset teh chronometer apporpriately.
I wrote th开发者_开发问答e code as below.
chronometer.setBase(SystemClock.elapsedRealtime());
chronometer.setBase((mediaPlayer.getCurrentPosition()));
but it didn't help. chronometer shows like 2:48:00, which is very big and unrealistic for a 2:00 file.
Can someone help me with this please.
Thanks in advance.
can you try this
chronometer.setBase(SystemClock.elapsedRealtime() - mediaPlayer.getCurrentPosition());
and tell me what happens.
精彩评论