viewHolder.check.setOnCheckedChangeListener(newCompoundButton.OnCheckedChangeListener()
{
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
{
if (viewHolder.check.isChecked()) {
// if (!selectedPic.contains(getProjects.get(position))) {
viewHolder.check.setChecked(true);
selectedPic.add(al.get(position).getuser_name());
// }
} else {
// viewHolder.editButton.setVisibility(View.GONE);
// viewHolder.archive.setVisibility(View.GONE);
// if(selectedPic.size()>1) {
viewHolder.check.setChecked(false);
selectedPic.remove(al.get(position).getuser_name());
// }
}
}
});
here is my code I used setOnCheckedChangeListener but its not get fired when I click the checkbox help me
Aucun commentaire:
Enregistrer un commentaire