2010-02-12 24 views

回答

0

在你layout xml file tell it to fill it's parent

<Button android:layout_width="fill_parent" .... ></Button> 

或者,如果您使用的是API,我認爲你應該能夠使用setLayoutParams

myButton.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); 
+0

該行由一個TextView和一個按鈕組成,該按鈕應該具有較寬的寬度,因爲該行較高。如果使用較小的字體,則該按鈕應該調整。 – friedger 2010-02-14 11:51:27

0

使用密度獨立像素(DIP),這是虛擬像素單元以密度無關的方式表達佈局尺寸或位置。

相關問題