hi, i am stuck with a problem creating buttons dynamically in android. This is what i want to do-
I want to create 8 x 10 array of buttons. Since declaring 80 buttons in main.xml isn't efficient, I want to do this in the program itself. The biggest problem is placing/aligning the buttons like a grid. I can create button objects but how do I align them in the program?
Button b = new Button(this);
b.setId(i);
b.setText("Button " + i);
Like this-
1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2 2 2
.
.
.
10 10 10 10 10 10 10 10 10 10
Any help in doing this "programtically" will be appreciated