P
P
Prototik2012-03-18 17:00:13
Android
Prototik, 2012-03-18 17:00:13

ListView and its cursed neighbor, CheckBox?

The bottom line is this: there is a ListVIew, there are its records, there is a CheckBox on this record. So, if CheckBox is present, ListVIew does not respond to clicks. Absolutely. If you remove it, everything sticks and stands out with a bang. Googling on the first two pages did not give a working result. Maybe someone faced such a problem? If necessary, I will lay out the markup of the record and the list adapter.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
bear11, 2012-03-18
@Prototik

C dexxtr.com/post/9620815720/checkbox-listview
and also personally confirm:
When developing for Android such controls as ListView, GridView, Gallery, Spinner and ExpandableListView and trying to add on their row, for example Checkbox (any clickable control) you will get the opportunity click on this Checkbox, but not on the list element (row).
But such an opportunity is very often needed. The problem can be solved by changing only one attribute in the properties of our “checkbox”:
?
android: focusable
="false"

A
Alexander Belugin, 2012-03-18
@unkinddragon

www.google.ru/search?q=android+listview+checkbox -> stackoverflow.com/questions/5417339/android-listview-with-checkbox-and-all-clickable -> appfulcrum.com/2010/09/12/ listview-example-3-simple-multiple-selection-checkboxes/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question