@NonNull
    public List<Integer> getCheckedButtonIndexes() {
        final List<Integer> checkedButtonIndexes = new ArrayList<>();
        for (int i = 0; i < getChildCount(); i++) {
            final MaterialButton child = (MaterialButton) getChildAt(i);
            if (child.isChecked()) {
                checkedButtonIndexes.add(i);
            }
        }

        return checkedButtonIndexes;
    }
Like {@link MaterialButtonToggleGroup#getCheckedButtonIds()}, but returns the INDEXEX of the checked views instead of their ids
main/src/main/java/cgeo/geocaching/ui/ButtonToggleGroup.java