Fixed bug in the mediaplayer seekbar
This commit is contained in:
parent
3e0937df7d
commit
425dc708e5
|
@ -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)));
|
||||||
|
|
Loading…
Reference in New Issue