Skip to content

Commit

Permalink
Fixed the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 committed Aug 8, 2019
1 parent e4bc619 commit bf0d401
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ void bind(final int index) {
CheckBox setUpButton(final int index) {
AppCompatCheckBox checkBox = new AppCompatCheckBox(widget.getContext());
adjustButton(checkBox, index);
checkBox.setOnClickListener(v -> {
onItemClick(filteredItems.get(index).selection(), null);
checkBox.setOnCheckedChangeListener((buttonView, isChecked) -> {
if (isChecked) {
addItem(filteredItems.get(index).selection());
} else {
removeItem(filteredItems.get(index).selection());
}
widget.widgetValueChanged();
});

Expand Down

0 comments on commit bf0d401

Please sign in to comment.