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
This work for me and will work for you as well Just Create Static List, I created it on MainActivity.java
public static List myItems = new ArrayList<>();
Create setOnCheckedChangeListener in YouAdapter.class
holder.checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
if(b){
myItems.add(Model.getYouItem());
}
else{
myItems.remove(Model.getYouItem());
}
}
});
Now you can use your myItems list to perform operations.