I have a ListView
with ChoiceMode as CHOICE_MODE_MULTIPLE
which is rendering each item with a checkbox to select.
List<Note> values = datasource.getAllNotes();
adapter = new ArrayAdapter<Note>(this, android.R.layout.simple_list_item_multiple_choice, values);
getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
setListAdapter(adapter);
Now I want to implement OnItemClickListener
to view the selected item details.
The problem is when I select an item, in addition to getting the checkbox checked the onItemClick() callback method also getting triggered where I am showing the selected Item details in AlertDialog.
How can I change the behavior so that item will be checked only when I click on checkbox and when I click on item text then onItemClick()
should be fired?