Skip to content

SectionedGrid with checkboxes #4

Description

@aliabbas2810

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions