package com.nex3z.togglebuttongroup;

import android.content.Context;
import android.util.AttributeSet;

public class MultiSelectToggleGroup extends ToggleButtonGroup {
    private static final String LOG_TAG = MultiSelectToggleGroup.class.getSimpleName();

    public MultiSelectToggleGroup(Context context) {
        this(context, null);
    }

    public MultiSelectToggleGroup(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void onToggleButtonClicked(int position) {
        ToggleButton button = mButtons.get(position);
        boolean isChecked = button.isChecked();
        isChecked = !isChecked;
        button.setChecked(isChecked, isAnimationEnabled());
        if (mListener != null) {
            mListener.onCheckedStateChange(position, isChecked);
        }
    }

}

@@ -98,16 +98,39 @@
 teSet;%0A%0A
+import java.util.Set;%0A%0A
 public c
@@ -854,10 +854,344 @@
 %0A    %7D%0A%0A
+    /**%0A     * Check buttons at the positions from the given set.%0A     *%0A     * @param checkedPositions positions to be checked%0A     */%0A    public void setCheckedPositions(Set%3CInteger%3E checkedPositions) %7B%0A        uncheckAll();%0A        for (int position : checkedPositions) %7B%0A            setCheckedAt(position, true);%0A        %7D%0A    %7D%0A%0A
 %7D%0A

Add setCheckedPositions() for multi-select case.