Hello All,
Below code is executed on a button click in my application.
new AlertDialog.Builder()
.setTitle("Test")
.setMultiChoiceItems(items, state, new
DialogInterface.OnMultiChoiceClickListener() {
public void onClick(DialogInterface dialog, int whichButton, boolean
isChecked) {
//ToDo: some processing
}
})
.setPositiveButton("Done", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
//ToDo: Some operations needs to be done
}
})
create()
.show();
I found when setPositiveButton is clicked multiple times (very fast),
OnClick call back function is called twice or thrice. But I want it to
be called only once. Subsequent clicks should be ignored.
I understand this can be accomplished, by doing some checks in OnClick
call back listener. But since this is happening at multiple places in
my application. I want to know if there is any standard way to resolve
this issue.
Thanks,
Vibhor Mahajan
--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en