The following are my code, I have checkboxes in the layout binding (filterManagerBinding) And I adding checkboxes in the (mncTable) gridview,
MncTable.getMncList().forEach(mncEntity -> {
ItemCheckboxBinding checkboxBinding = ItemCheckboxBinding.inflate(inflater);
checkboxBinding.getRoot().setText(String.format("%s-%s",mncEntity.getMnc(),mncEntity.getBrand()));
filterManagerBinding.mncTable.addView(checkboxBinding.getRoot());
});
I tried to this code below it work but it's not solution to me because of some checkbox is selected at initial (default) So I didn't get the checkbox value that was selected from the default.
checkboxBinding.getRoot().setOnCheckedChangeListener((compoundButton, isChecked) -> {
//do something get value
});