[android-developers] Re: How to get and edit button in an AlertDialog

2009-07-14 Thread Chris
I had the same problem of getButton() returning null. Just reorder the calls so that you show() the dialog before trying to access its buttons: AlertDialog alertDialog = builder.create(); alertDialog.show(); Button button = (Button) alertDialog.getButton(BUTTON_POSITIVE); // edit the button

[android-developers] Re: How to get and edit button in an AlertDialog

2009-06-08 Thread Thomas
Anyone can help me? Thanks Thomas On 6/4/09, Thomas perd...@gmail.com wrote: Hi All, I need to build a AlertDialog with a short text (A) and an OK Button. But if I use AlertDialog.Builder, the ok text button is not shown with a short text message. I tried to recover the Button object and