I am using Range Seekbar in my project. Now I am playing a video in VideoView
and want to sync. VideoView
using Range Seekbar.
I have already implemented following code but problem is videoview is synced only when I stop Dragging Seekbar
.
I want to sync. videoview While I am dragging the range seekbar. I know that it is implemented in normal seekbar via onProgressChanged
; but I want to implement a similar thing for Range seekbar
.
Current Code
RangeSeekBar<Integer> seekBar = new RangeSeekBar<Integer>(0, 100, getBaseContext());
seekBar.setOnRangeSeekBarChangeListener(new OnRangeSeekBarChangeListener<Integer>() {
@Override
public void onRangeSeekBarValuesChanged(RangeSeekBar<?> bar, Integer minValue, Integer maxValue) {
current_pos=minValue*1000;
videoView.seekTo(current_pos);
}
});
Thanks in advance.
Ok just add the below code before calling the Listener
,
RangeSeekBar<Integer> seekBar = new RangeSeekBar<Integer>(0, 100, getBaseContext());
seekBar.setNotifyWhileDragging(true);
This is by default false
; making it true
would solve the problem. :)