Hi i have a question about the return value of onTouchListener.
To make the example below work as expected, i have to return false, if
i return true the event is not being handled by web view,
Could someone explaint the workflow of an onTouch event and the
relationship between onTouchListener and the onTouchEvent of the view?
I'will really appreciate that.
Thanks!
[code]
webView.setOnTouchListener(new OnTouchListener(){
@Override
public boolean onTouch(View v, MotionEvent event) {
if (!v.isFocused())
v.requestFocus();
if (event.getAction() ==
MotionEvent.ACTION_MOVE) {
event.setAction(MotionEvent.ACTION_DOWN);
Log.i("HitTest",String.valueOf(((WebView)v).getHitTestResult
().getType()));
Log.i("HitTest",String.valueOf(((WebView)v).getHitTestResult
().getExtra()));
}
return false;
}
});
[/code]
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en