I am creating customized list with multiple selection with help of Checkbox. At last i managed to set checkbox selected on list's item selection's event.
but when I check boxes are not being selected according to list's selection When I click on first row 4th row's check box gets clicked automatically . In short sequence is not maintained. The code with I am working is as below
ListAdapter adapter = new SimpleAdapter(
this,
Datalist ,
R.layout.customlist,
new String[] {"fileName","contentLength","keyPath"},
new int[] {R.id.title,R.id.size, R.id.path}
);
setListAdapter(adapter);
protected void onListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
ViewGroup group=(ViewGroup)v;
CheckBox check=(CheckBox)group.findViewById(R.id.sharecheckbox);
check.toggle();
}