public class Test0812Activity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
AbsoluteLayout layer = (AbsoluteLayout)findViewById(R.id.AbsoluteLayout01);
CheckBox btt = new CheckBox(this);
layer.addView(btt);
btt.setText("4567");
btt.layout(100, 100, 200, 200);
btt.postInvalidate();
}
}
为什么生成的CheckBox总是出现在左上角,而不是layout函数中规定的100,100,200,200?
需要怎么改可以解决这个问题?
幕布斯6054654
MMMHUHU
回首忆惘然