private void init() {
        //create the selectAllChip
        selectAllNoneButton = createChip(LayoutInflater.from(getContext()), TextParam.id(R.string.multiselect_selectall));
        selectAllNoneButton.setOnClickListener(v -> {
            final boolean c = selectAllNoneButton.isChecked();
            for (CompoundButton tb : valueButtons) {
                tb.setChecked(c);
            }
        });
    }
A group of text chips with multiselect allowed
main/src/main/java/cgeo/geocaching/ui/ChipChoiceGroup.java