0

I have a webview in my activity which loads a url. The url has a dropdown menu within it (created using "select").

I want to receive the touch events which occur when I touch on the webview. I am able to get the touch event from the webview but when I touch the dropdown menu in the webview, the touch event is not received by the activity.

How can I get the touch events from dropdown menu within a url inside a webview ?

Here is what I have tried till now :-

            webView.setOnTouchListener(new OnTouchListener() {

            @Override
            public boolean onTouch(View v, MotionEvent event) 
            {


                if (ActionType == MotionEvent.ACTION_DOWN  || ActionType == MotionEvent.ACTION_SCROLL) {

                    Log.d("WebView","Webview Touched");

                }
            }

1 Answers1

0

You can refer the android documentation here. http://developer.android.com/guide/webapps/webview.html

Also check this link to see some examples. Webview's Html button click detection in Activity(java code)

Community
  • 1
  • 1
Febi M Felix
  • 2,799
  • 1
  • 10
  • 13