我想给每个button创建一个新的LinearLayout。最后实现排序数字。
1 2 3
4 5 6
7 8 9
需要创建一个新的LinearLayout
作为HORIZONTAL
。但是怎么在循环中创建?
for (int i=1:i<=9:i++) {
Button b = new Button(this);
b.setText(""+i);
// I need to do something here and put my general layout
}