问题
My main activity contains a webview
and a seekbar
. The seekbar
is an interface to interact with the server , and the crosswalk webview
is to visualize a jmpeg streaming
My problem is: while the user is changing the position of the seekbar
's thumb the webview
content looks choppy.
seekbar
's listener implementation:
seek.setOnSeekBarChangeListener(
new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
int x=2*progress;
int y=seekv.getProgress();
if (x>45 && x<55 && fromUser )
{seek.setProgress(25);
if(!done)
{done=true ;
socket.emit("move1",x,y);
}
}
else if (fromUser){
socket.emit("move1", x, y);
done=false ;
}
}
来源:https://stackoverflow.com/questions/38276398/seekbar-progress-making-the-crosswalk-webview-choppy