我遇到了麻烦ListView。它的项目(行)有一个ImageButton. 已设置,因此此ImageButton事件有效,但单击行不起作用。android:onClickonClick
如果我ImageButton从行项目中删除,请单击行工作(ListView具有正确的onClick侦听器)。我该如何解决?我需要onClick用户单击ImageButton时的事件,以及用户选择行时的标准单击事件(不是单击ImageButton而是单击行)。
我的列表视图:
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/restaurants_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:divider="@color/list_devider"
android:dividerHeight="1dp"
android:cacheColorHint="@color/list_background" />