0
我試圖添加一個視圖到佈局,並把視圖放在屏幕的底部。 這裏是我的代碼視圖和佈局vs setGravity
RelativeLayout game = new RelativeLayout(this);
game.addView(new Menu(this));
game.addView(ad.getAd());
game.setGravity(Gravity.BOTTOM);
setContentView(game);
但查看被印在屏幕的頂部,爲什麼心不是setGravity工作?
http://stackoverflow.com/questions/2305395/laying-out-views-in-relativelayout-programmatically – 2012-01-16 14:54:29