Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/227.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 父布局可以';无法检测单击WebView_Android - Fatal编程技术网

Android 父布局可以';无法检测单击WebView

Android 父布局可以';无法检测单击WebView,android,Android,我有这样的布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:clickable="true" android

我有这样的布局:

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:clickable="true"
    android:focusable="true"
    android:foreground="?selectableItemBackground"
    android:orientation="horizontal">

    <RadioButton
        android:id="@+id/radioButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical" />

    <WebView
        android:id="@+id/webView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical" />
</LinearLayout>

在我的
RecyclerView
中,我想检测对该布局任何部分的点击,而不仅仅是
RadioButton
。我遇到的问题是,我将click listener放在布局本身上,但当用户单击
WebView
时,它不会检测到单击。我尝试过使
WebView
不可点击和不可聚焦,但仍然不起作用