Fixed bug in the mediaplayer seekbar

This commit is contained in:
daniel oeh 2012-06-24 18:20:26 +02:00
parent 3e0937df7d
commit 425dc708e5
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ public class MediaplayerActivity extends SherlockActivity {
public void onProgressChanged(SeekBar seekBar, int progress, public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) { boolean fromUser) {
if (fromUser) { if (fromUser) {
prog = progress / 100.0f; prog = progress / ((float) seekBar.getMax());
duration = playbackService.getPlayer().getDuration(); duration = playbackService.getPlayer().getDuration();
txtvPosition.setText(Converter txtvPosition.setText(Converter
.getDurationStringLong((int) (prog * duration))); .getDurationStringLong((int) (prog * duration)));