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
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
2 matches
Mail list logo