internal virtual void SetUpMultiChoiceCallback(bool[] checkedItems, IDialogInterfaceOnMultiChoiceClickListener listener) { int[] selectedIndicesArr = null; /* Convert old style array of booleans-per-index to new list of indices */ if (checkedItems != null) { List <int> selectedIndices = new List <int>(); for (int i = 0; i < checkedItems.Length; i++) { if (checkedItems[i]) { selectedIndices.Add(i); } } selectedIndicesArr = selectedIndices.ToArray(); } builder.SetItemsCallbackMultiChoice(selectedIndicesArr, new ListCallbackMultiChoiceAnonymousInnerClassHelper(this, checkedItems, listener)); }