SectionedGrid icon indicating copy to clipboard operation
SectionedGrid copied to clipboard

SectionedGrid with checkboxes

Open aliabbas2810 opened this issue 9 years ago • 0 comments

Hello there. I added checkbox in each row item so that i can select multiple item and then send the selected item to the next activity. but i am facing difficulty and there is no way out that's why i referred to the original source.

i am using the position parameter of the (View convertView, int position) function to set the tag of my checkbox

mCheckBox.setTag(position);

When i select some item and scroll the listview the mCheckBox.setOnCheckedChangeListener(mCheckedChangeListener); is called and it reset my the position of data that i am storing in a SparseBooleanArrayas follow

CompoundButton.OnCheckedChangeListener mCheckedChangeListener = new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { mSparseBooleanArray.put((Integer) buttonView.getTag(), isChecked); } };

I hope that i will get a response for you and thanks in advance.

aliabbas2810 avatar May 17 '15 17:05 aliabbas2810