I need to implement an AlertDialog with a EditView and an an OK and a
Cancel button. I would like to be able to enable/disable the OK button
if the EditText has/does not have text in it. I have two choices but I
have problems with each approach:

1) If I create the AlertDialog with a layout which contains simply the
EditText, the problem I'm having is that I can't get hold of the OK
button widget to enable/disable it. Maybe you can suggest a way...
like calling findViewById( unknown_ok_button_id) for the dialog layout
which I don't know how to get :-)

2) I can create the AlertDialog with a layout which contains the
EditText and the OK and the Cancel buttons (no positive and negative
buttons). This approach works but there is side effect. In the 0.9 SDK
there is unwanted padding at the bottom and the of the dialog (maybe
20dip). Maybe you can suggest a way to modify my layout to make it
ignore the padding of the dialog layout. I tried clipToPadding="false"
but that did not work.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to