I have a ListView containing a checkbox, an imageview, two textviews and a button. T开发者_如何学Gohe problem is after adding the checkbox and the button the onitemclick event of the ListView is not responding. Will anybody suggest a work around for the problem?
You can set both android:focusable
and android:focusableInTouchMode
attributes of checkbox to false
and onItemClick
of the list will be called. But you'll have to call CheckBox#toggle()
yourself in onItemClick
.
Add an onlick listner to the view. or the checkbox and handle it manually.
When you use checkbox
in your listview
then it consumes your click action and your check action will be performed.
You can put click listener over textview, imageview or button. you also need to handle checkbox.
精彩评论