2013-04-09 79 views
0

我想做一個如下圖的佈局和單獨的列可以點擊 我調查了listView兩列,但是沒有單獨的一行,只有一列點擊 GridView!怎麼樣? GridView可以做到這一點!? 請幫助我,我沒有理想如何做到這一點,thx。 enter image description hereAndroid兩列布局

回答

0

在我看來,你應該使用TableLayout來實現你的目標。你會把2個按鈕放在一行(然後你會得到2列)。您還應該將按鈕上的權重設置爲1以獲得兩個相等的列。

這裏有有用的鏈接:

  1. Button width in Android TableLayout
  2. http://www.mkyong.com/android/android-tablelayout-example/
  3. http://developer.android.com/reference/android/widget/TableLayout.html
  4. http://mobile.tutsplus.com/tutorials/android/android-sdk_table-layout/