Trying to programmatically set the state of a SWITCH inside a LISTVIEW after the listview is displayed
So i have a list of alarms and i bind that to the listview, lstAlarms. In my custom ListView layout, i also have a switch, which i want to be set programmatically according to the status of the alarm. I want to do this right after the ListView is just displayed. Please see my codes below. The method that display the ListView is DisplayAlarmList(). The method that im trying to use to set the states of the switches is InitSwitches(), which is being called inside of DisplayAlarmList(). DisplayAlarmList() is called in the onCreate() method. public void DisplayAlarmList() { final String[] columns =