SeekBar progress making the crosswalk webview choppy

一世执手 提交于 2020-01-15 05:04:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!