Hi,

I guess, it is not possible to do it with setPositiveButton, since it
it's click, the dialog will be dismissed. What you can do it, you
should put an extra button on the Alert Dialog, and write your handler
for that. Clicking on that button wont close your dialog. And from the
handler of the new button listener,  based on a condition, you can
dismiss the dialog if you want.

Dexter.

On Jun 30, 1:10 am, skyman <[email protected]> wrote:
> Hello,
>
> In my app i have an AlertDialog created using AlertDialog.Builder with
> custom view (form) inside.
>
> When user clicks "OK" (positive) button I want to validate field
> contents and close the button when everything is correct or show Toast
> otherwise and leave dialog open?
>
> Is it possible using standard setPositiveButton(text,
> DialogInterface.OnClickListener); ??
>
> Regs,
>
> Krzysiek Bielicki
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to