Created
February 13, 2013 06:06
-
-
Save squm/4942614 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case DIALOG_LIST: | |
return new AlertDialog.Builder(AlertDialogSamples.this) | |
.setTitle(R.string.select_dialog) | |
.setItems(R.array.select_dialog_items, new DialogInterface.OnClickListener() { | |
public void onClick(DialogInterface dialog, int which) { | |
/* User clicked so do some stuff */ | |
String[] items = getResources().getStringArray(R.array.select_dialog_items); | |
new AlertDialog.Builder(AlertDialogSamples.this) | |
.setMessage("You selected: " + which + " , " + items[which]) | |
.show(); | |
} | |
}) | |
.create(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment