Code example for AlertDialog.Builder

Methods: setMultiChoiceItems

0
    @Override 
    protected void onPrepareDialogBuilder(Builder builder) {
        CharSequence[] entries = getEntries();
        CharSequence[] entryValues = getEntryValues();
 
        builder.setMultiChoiceItems(
                entries, listBool,
                new DialogInterface.OnMultiChoiceClickListener() {
                    public void onClick(DialogInterface dialog, int which,
                            boolean isChecked) {
                        //mNewDaysOfWeek.set(which, isChecked); 
                    } 
                }); 
    } 
 
    /*public void setDaysOfWeek(Alarm.DaysOfWeek dow) { 
        mDaysOfWeek.set(dow); 
        mNewDaysOfWeek.set(dow); 
        setSummary(dow.toString(getContext(), true)); 
    }*/