Hello all,
I'm playing with the AlertDialogSample.java program.
I want to add lines in the code to get the value in the onClick
methods.
Please see the location marked as "==>" that I want to add lines.
Could you please guide me what lines should be there?
Thank you.
case DIALOG_SINGLE_CHOICE:
return new AlertDialog.Builder(AlertDialogSamples.this)
.setIcon(R.drawable.alert_dialog_icon)
.setTitle(R.string.alert_dialog_single_choice)
.setSingleChoiceItems(R.array.select_dialog_items2, 0,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
whichButton) {
/* User clicked on a radio button do some
stuff */
}
})
.setPositiveButton(R.string.alert_dialog_ok, new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
whichButton) {
/* User clicked Yes so do some stuff */
=====>
=====>
}
})
.setNegativeButton(R.string.alert_dialog_cancel, new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
whichButton) {
/* User clicked No so do some stuff */
}
})
.create();
case DIALOG_MULTIPLE_CHOICE:
................
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---