views:

236

answers:

0

I'm building an app with a build target of 1.5 . I have a variable, WebView browser, that is calling loadUrl to load a static HTML page from my assets folder.

In that HTML page, the following JavaScript is defined:

var  supportsTouch = ('createTouch' in document);

 ...

var w = $('wrapper');

w[supportsTouch ? 'touchmove' : 'onmousemove'] = move;
w[supportsTouch ? 'touchend' : 'onmouseup'] = function(event){ dragging = false; };

where move is another function that handles the dragging.

Unfortunately, this doesn't seem to work. I cannot figure out a concise list of which touch events are available to Android--is it ontouchmove, or touchmove? Am I supposed to set up an onTouchEvent call back in my Java code, which then launches the JavaScript function?