I have a SeekBar
, it displays correctly MediaPlayer
progress. However, I have troubles with seeking - if I seek scroll box somewhere it just return
if you want to resume media player to specific position from seekbar change progress, I recommend you to do that in onStopTrackingTouch() method. that method will notify that the user has finished a touch gesture, then set media player position from seekbar's current position.
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
mediaPlayer.seekTo(seekBar.getProgress());
}