vendredi 18 janvier 2019

In android, Checking checkbox in a recyclerview, automatically checks some other checkboxes

I need to select some items using a checkbox in each entry of a android recycler view. Once i checked the checkbox in position 0, every 9th position checkbox also checked automatically when scrolling.

How to overcome this? Kindly suggest me a solution.

//In my adapter class

   holder.approveCheckbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
                @Override
                public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
                    Logger.infoLog("Checked Position ==> "+position+" boolean ==> "+b);



                }
            });




Aucun commentaire:

Enregistrer un commentaire