I have the code below, now I need to keep track of the checkbox state in each gridview item, and fetch that info on a button click to update the information. My button event in the calling activity of imageadapter for a gridview.

@RobinHood thanks for your msg. No only one button for all the checkboxes checked. The button just gets list of the checkboxes which are active/checked and does work based on this info.
–
AliROct 10 '12 at 5:15

on click of button all checkboxes get checked?
–
RobinHoodOct 10 '12 at 5:44

the button needs to get the info only about all the checkboxes it doesn't interacts (checked/unchecked). So I can't seem to find a way to get info about all the checkboxes.
–
AliROct 10 '12 at 5:48

this "checkbox.setOnClickListener(new OnClickListener() {" is not working for me it has only checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if(isChecked)
–
AliROct 10 '12 at 6:22

ok thanks RobinHood, but how can I move this array to the parent activity
–
AliROct 10 '12 at 6:44

@Adil Soomro added at the chat window:"You can get it using yourAdapter.getCheckStateArray();, make sure to write this method in your Adapter and there you will return your Adapter's array from that method."
–
AliROct 10 '12 at 7:27