Fix jumping thumb
This commit is contained in:
parent
c3a0e228cc
commit
0106cdc8bf
|
@ -482,8 +482,11 @@ public class AudioPlayerFragment extends Fragment implements
|
||||||
} else {
|
} else {
|
||||||
txtvLength.setText(Converter.getDurationStringLong(duration));
|
txtvLength.setText(Converter.getDurationStringLong(duration));
|
||||||
}
|
}
|
||||||
float progress = ((float) event.getPosition()) / event.getDuration();
|
|
||||||
sbPosition.setProgress((int) (progress * sbPosition.getMax()));
|
if (!sbPosition.isPressed()) {
|
||||||
|
float progress = ((float) event.getPosition()) / event.getDuration();
|
||||||
|
sbPosition.setProgress((int) (progress * sbPosition.getMax()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
|
Loading…
Reference in New Issue