Skip to content Skip to sidebar Skip to footer

Listview With Checkbox - Why The Checkbox Doesn't Show?

I'm using the ListView to provide a list for the user to choose from. Here is the main code: SimpleAdapter adapter = new SimpleAdapter(this,contacts, R.layout.list_contact,

Solution 1:

It looks like that your R.layout.list_contact isn't CheckedTextView.

See source of android.R.layout.simple_list_item_multiple_choice

I can recommend you to build custom view which is child of any ViewGroup classes and implementator of interface Checkable.

Solution 2:

id of checkBox and listView in R.layout.list_contact should be specific .

so follow ApiDemoes multiple List example for both layout and java code .

Post a Comment for "Listview With Checkbox - Why The Checkbox Doesn't Show?"