Hi All,
I currently have a ListView in my Android app that has a CheckBox on the side.
When the checkbox is changed I want to get some info from the listview row that the button is in and then persist it, however, I can not work out how to get the row data from the onClickChanged listener.
My listview is populated using a custom JSONObject listadapter, I am hoping it is something similar to working out what row is selected when detecting the onLongTouch - for example below is the code I use to get the relevant JSON object for the row selected on a longTouch:
public boolean onContextItemSelected(MenuItem item) {
//get row selected information
AdapterView.AdapterContextMenuInfo menuInfo = (AdapterView.AdapterContextMenuInfo)item.getMenuInfo();
JSONObject selected = (JSONObject) getListAdapter().getItem(menuInfo.position);
The above is obviously within my ListActivity, and my onCheckChanged listener would not be in the same activity (as it is defined in the row rather than the list)
Any help would be appreciated!