方法就是修改item布局的xml文件:
在根布局里加上:
[html]
android:descendantFocusability="blocksDescendants"
然后在按钮布局里加上:
[html]
android:focusable="false"
item和按钮都 可以点了,就OK了
下面是布局示例:
[html]
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:descendantFocusability="blocksDescendants"
[html]
android:id="@+id/worklog_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="修改"
android:focusable="false"
/>
android:id="@+id/worklog_del"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="删除"
android:focusable="false"
/>