MLinearLayout=the findViewById (R.i d.m _linearlayout);
Final LinearLayout [] LinearLayout=new LinearLayout [10].
for(int i=0; i<10; I++) {
LinearLayout [I]=new linearLayout (this);
LinearLayout [I] setOrientation (HORIZONTAL);
LinearLayout [I] setHorizontalGravity (CENTER);
MLinearLayout. AddView (linearLayout [I]);
}
CodePudding user response:
Fumbling along while, turned out to be less container mLinearLayout attribute is set, the following Settings, solved,MLinearLayout. SetOrientation (VERTICAL);
MLinearLayout. SetHorizontalGravity (CENTER);