ListView 和 其它能触发点击事件的widget无法一起正常工作的原因是加入其它widget后,ListView的itemclick事件将无法触发,被其它widget的click事件屏蔽。
res/layout/lvitem.xml
注意:
在<RelativeLayout>中
android:descendantFocusability="blocksDescendants"
和<ImageButton>中
android:focusable="false"
这两项的设置很关键,如果不设置,将导致ListView的ItemClick事件将无法触发,该事件被ImageButton的click事件屏蔽了。
如图: