My ListView contain a list of custom items. Each item contains a CheckBox and an associate TextView. I wanted to check/uncheck items from the ListView, but it didn’t let me.
According Matt C’s solution on SO, Android doesn’t allow selections on items that are focusable (namely CheckBox). The fix was quite simple =A=; just add the following line in the CheckBox attribute to disable focus:
After adding the above line will make the item selectable EXCLUDING the checkbox. You either want to implement the checkbox with another action or can simply disable clickable for it to work with the ListView.
So now i have something like this =3=:
<CheckBox android:id="@+id/checkBox1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusable="false" android:clickable="false" />