Merge pull request #5141 from jonasburian/fix-jumping-thumb
Jumping thumb while seeking
This commit is contained in:
commit
b4bb7f4e59
|
@ -482,8 +482,11 @@ public class AudioPlayerFragment extends Fragment implements
|
|||
} else {
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue