I know that you can graphically switch the checked state of an item in a ListView. But how is this done? I have a ListView containing several CheckedTextView elements and I tried to set the checked state of these elements by calling
list.setItemChecked(arg2, false);
and correspondingly
list.setItemChecked(arg2, true);
This is called in the OnItemClickedListener of my ListView, therefore, arg2is the index of the item that clicked. However, the item is not checked. Is there a call in the Adapter list that I am missing? Or what could it be?
source
share