0
該代碼在按鈕的onclick
在活動:如何通過單擊按鈕選擇RecyclerView中的所有複選框?
if(v.getId()==recomendationSelectAllFriends.getId()){
recomendationAdapter.selectAll(resultEntities.size());
}
此方法在適配器:
public void selectAll(int size){
// what should be written here?
}
https://stackoverflow.com/questions/4876083/correct-way-to-check-all-checkboxes -in-listview檢查這一點 – AAA