Code example for WebView

Methods: setOnTouchListener

0
    { 
//	android.util.Log.v("console", "pagefinished_" + url); 
	if (Build.VERSION.SDK_INT <= 10) {
	    //this.view = view; 
	    injectWMPJs(); 
	    view.setOnTouchListener(new View.OnTouchListener()
	    { 
		public boolean onTouch(View arg0, MotionEvent arg1)
		{ 
		    WebView view = (WebView) arg0;
		    if (polyfillAllTouches || arg1.getPointerCount() > maxNativeTouches || arg1.getPointerId(arg1.getActionIndex()) + 1 > maxNativeTouches) {
			updateMoveBuffer(view, arg1);
			/* Tracking each and every move would be total javascript runtime overkill, 
			 * therefore only changes by at least one pixel will be tracked 
			 */ 
			if (moveBuffer.length() > 0 || arg1.getAction() != MotionEvent.ACTION_MOVE) {
			    String EventJSON = getEvent(arg1);
			    view.loadUrl("javascript: WMP.polyfill(" + EventJSON + ");");
 
//							android.util.Log.d("debug-console", EventJSON); 
Connect your IDE to all the code out there  Get Codota for Java