0
我的佈局是這樣的:將TableRow與不同的表對齊?
<TableLayout>
<TableRow></TableRow>
<TableLayout>
<TableRow></TableRow>
<TableRow></TableRow>
<TableRow></TableRow>
</TableLayout>
</TableLayout>
我有一個TableLayout內的TableLayout。第一次加載時,內部TableLayout可見性設置爲「已完成」。所以它只是一個TableRow。當用戶單擊單個TableRow時,它將內部TableLayout的可見性更改爲Visible。
問題是,第一個TableRow中的列不與其他TableRow對齊。我怎麼能讓他們全部排隊?
我在裏面使用了另一個TableLayout,這樣我就可以簡單地在該TableLayout上設置可見性,而不必在所有行和間隔符上執行該操作。也許有更好的方法?
也許一個LinearLayout將適用於每列。您還可以使用LinearLayout和layout_weight參數來使事物的大小相等:http://stackoverflow.com/questions/3609822/best-practices-for-targetting-a-wide-range-of-devices-and -screen-尺寸/ 3610381#3610381 – 2011-03-13 20:47:12