- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
1. Default Dialogs
You can show standard Android AlertDialog with:
- Only positive button
- Positive and negative buttons
- Positive, negative and neutral buttons
- Dialog with simple items chooser
- Dialog with radio buttons items chooser
- Dialog with check boxes buttons items chooser
Opens Android AlertDialog with only positive button and optional dismiss callback.
Example usage:
AndroidAlertDialog.ShowMessageDialog("Single Button", "This dialog has only positive button", "Ok",
    () => AndroidGoodiesMisc.ShowToast("Positive button Click"),
    () => AndroidGoodiesMisc.ShowToast("Dismissed"));Result:
 
Opens Android AlertDialog with positive and negative buttons and optional dismiss callback.
Example usage:
AndroidAlertDialog.ShowMessageDialog("Two Buttons", "This dialog has positive and negative button",
    "Ok", () => AndroidGoodiesMisc.ShowToast("Positive button Click"),
    "No!", () => AndroidGoodiesMisc.ShowToast("Negative button Click"),
    () => AndroidGoodiesMisc.ShowToast("Dismissed"));Result:
 
Opens Android AlertDialog with positive, negative and neutral buttons and optional dismiss callback.
Example usage:
AndroidAlertDialog.ShowMessageDialog("Three Buttons",
    "This dialog has positive, negative and neutral buttons button",
    "Ok", () => AndroidGoodiesMisc.ShowToast("Positive button Click"),
    "No!", () => AndroidGoodiesMisc.ShowToast("Negative button Click"),
    "Maybe!", () => AndroidGoodiesMisc.ShowToast("Neutral button Click"),
    () => AndroidGoodiesMisc.ShowToast("Dismissed"));Result:
 
Opens Android AlertDialog with a list of items to choose one of them. The dialog is dismissed automatically after the user selects one of the options.
Example usage:
string[] Colors = { "Red", "Green", "Blue" };
AndroidAlertDialog.ShowChooserDialog("Choose color", Colors,
    colorIndex => AndroidGoodiesMisc.ShowToast(Colors[colorIndex] + " selected"));Result:
 
Opens Android AlertDialog with a list of items to choose one of them with radio buttons. Also has a positive button with callback.
Example usage:
string[] Colors = { "Red", "Green", "Blue" };
int defaultSelectedItemIndex = 1;
AndroidAlertDialog.ShowSingleItemChoiceDialog("Choose color", Colors, defaultSelectedItemIndex,
    colorIndex => AndroidGoodiesMisc.ShowToast(Colors[colorIndex] + " selected"),
    "OK", () => AndroidGoodiesMisc.ShowToast("OK!"));Result:
 
Opens Android AlertDialog with a list of items to choose multiple of them with check boxes. Also has a positive button with callback.
Example usage:
string[] Colors = { "Red", "Green", "Blue" };
bool[] initiallyCheckedItems = { false, true, false }; // second item is selected when dialog is shown
AndroidAlertDialog.ShowMultiItemChoiceDialog("Choose color", Colors,
    initiallyCheckedItems,
    (colorIndex, isChecked) => AndroidGoodiesMisc.ShowToast(Colors[colorIndex] + " selected? " + isChecked), "OK",
    () => AndroidGoodiesMisc.ShowToast("OK!"));Result:
