0
我在我的活動中加載了一個url的webview。該網址中有一個下拉菜單(使用「選擇」創建)。Android:通過webview加載的url內的下拉菜單觸摸事件
我想要接收觸摸到webview時發生的觸摸事件。我可以從webview中獲取觸摸事件,但是當我觸摸webview中的下拉菜單時,觸摸事件不會被活動接收。
如何從webview中的url內的下拉菜單中獲取觸摸事件?
這是我已經試過至今: -
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");
}
}