I have populated the recyclerView with image, title and checkbox. I have two problems.
How to make the checkbox selected when the imageview or the whole rec
from @ninjahoahong I add checkbox listenner in onBindViewHolder method and checkbox can click able.
viewHolder.checkBox.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
int pos = viewHolder.getAdapterPosition();
ChoiceItem currentItem = mChoice.get(pos);
if(viewHolder.checkBox.isChecked()){
onItemCheckListener.onItemCheck(currentItem);
currentItem.setCheck(true);
}else{
onItemCheckListener.onItemUncheck(currentItem);
currentItem.setCheck(false);
}
}
});