0

The AlertDialog in Android's API provides an easy way to produce nicely looking Dialog with either one, two or three buttons. By "nicely looking", I meant the buttons are laid out nicely of equal width at the bottom and they do not have borders and grey backgrounds as the usual Button object. This is a little bit limited in some situation, in fact, I am in need of 4 buttons.

I want to ask if there is a way to produce the same user interface. Thank you in advance.

An Hoa
  • 1,207
  • 12
  • 38

1 Answers1

0

create a class extending the alertdialog, then put as many buttons as you want. But im fairly sure that a custom alertdialog has to have it's view inflated with a layout inflator instead of simply using setcontentView

mango
  • 5,577
  • 4
  • 29
  • 41
  • Thanks. I forgot the power of GridLayout which allows us to organize things homogeneously. – An Hoa Oct 14 '12 at 00:35
  • If having them evenly spaced was the issue, there's no reason you couldn't do it with a relative layout or linear layout utilizing layout weights. – mango Oct 14 '12 at 12:12