layout = new LinearLayout(this);
addContentView(layout, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
Button btn = new Button(this);
btn.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
btn.setText("button");
layout.addView(btn);
Button btn1 = new Button(this);
btn1.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
btn1.setText("button");
layout.addView(btn1);
我知道,我必须失踪,因为只要我对这一布局提出看法,我就只能表明其中之一。