1
我有這個簡單的代碼:我如何確定佈局中的Button(x,y)線?
layout = new RelativeLayout(this);
bottom = new LinearLayout(this);
Button close = new Button(this);
close.setText("Close");
bottom.addView(close);
layout.addView(bottom);
setContentView(layout);
我怎樣才能把我的按鈕,我寧願確定X,Y線但任何解決方案將是很好的窗口的底部。 由於absoluteLayout已被棄用,我嘗試使用Relativelayout作爲API提示沒有成功。
我根本不使用XML是一個問題?
感謝它的工作:) – Rami 2011-03-10 13:20:33