Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.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 没有为具有微调器的listview调用listitemclick_Android - Fatal编程技术网

Android 没有为具有微调器的listview调用listitemclick

Android 没有为具有微调器的listview调用listitemclick,android,Android,我有一个列表视图,其中每行包含一个图像视图、一个文本视图和一个微调器 OnItemClickListener对于图像视图和文本视图非常有效,但是当我添加微调器时,OnItemClickListener不起作用 我为微调器元素使用了android:focusable=“false”属性,也为父ListView使用了android:genderantfocusability=“blocksDescendants”属性,但这并没有修复它 有人知道如何让侦听器使用微调器吗 我的微调器和ListView代

我有一个
列表视图
,其中每行包含一个
图像视图
、一个
文本视图
和一个
微调器

OnItemClickListener对于
图像视图
文本视图
非常有效,但是当我添加
微调器
时,OnItemClickListener不起作用

我为
微调器
元素使用了
android:focusable=“false”
属性,也为父
ListView
使用了
android:genderantfocusability=“blocksDescendants”
属性,但这并没有修复它

有人知道如何让侦听器使用
微调器吗

我的微调器和ListView代码如下:

<LinearLayout
    android:id="@+id/BBQ_linearLayout"
    android:layout_width="896dp"
    android:layout_height="609dp"
    android:layout_alignRight="@+id/LinearLayout4"
    android:layout_marginBottom="0dp"
    android:layout_marginLeft="5dp"
    android:layout_marginTop="57dp"
    android:orientation="vertical"
    android:visibility="visible"
    android:textColor="@color/Black">

    <ListView
        android:id="@+id/BBQ_list"
        android:layout_width="896dp"
        android:layout_height="609dp"
        android:layout_marginBottom="0dp"
        android:layout_marginRight="5dp"
        android:layout_marginTop="0dp"
        android:background="@drawable/background"
        android:descendantFocusability="blocksDescendants"
        android:textColor="@color/Black"
        android:visibility="visible"
         >

    </ListView>     
</LinearLayout >

微调器代码为:

<Spinner
    android:id="@+id/spinnerquant"
    android:layout_width="70dp"
    android:layout_height="50dp"
    android:layout_gravity="center"
    android:entries="@array/quantity_arrays"
    android:focusable="false"
    android:prompt="@string/quantity_prompt" />


使用微调器。setOnClickListener(){…}问题在于单击
微调器什么都不做,或者
微调器实际上是否展开,但当您单击
微调器中的项目时,它们什么也不做?微调器正在工作,但当我单击Listitem时,实际上什么都没有发生。ClickListener没有被调用。您是否可以提供任何链接,例如ListView的每一行都包含微调器?????