2
A
回答
5
試試這個...你可以使用layout_weight屬性來達到你正在嘗試做.. 下面的佈局將有佈局在上面的圖片顯示的你..
<?xml version="1.0" encoding="utf-8"?><TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TableRow>
<TableLayout android:layout_width="0dip"
android:layout_weight="2" android:layout_height="fill_parent">
<TableRow android:layout_width="0dip" android:layout_weight="2"
android:layout_height="0dip">
<View android:layout_width="0dip" android:layout_weight="1"
android:layout_margin="5dip" android:layout_height="fill_parent"
android:background="#fff"></View>
<View android:layout_width="0dip" android:layout_weight="1"
android:background="#eee" android:layout_margin="5dip"
android:layout_height="fill_parent"></View>
</TableRow>
<TableRow android:layout_width="0dip" android:layout_weight="2"
android:layout_height="0dip">
<View android:layout_width="0dip" android:layout_weight="1"
android:background="#eee" android:layout_height="fill_parent"
android:layout_margin="5dip"></View>
<View android:layout_width="0dip" android:layout_weight="1"
android:layout_margin="5dip" android:layout_height="fill_parent"
android:background="#fff"></View>
</TableRow>
</TableLayout>
<TableLayout android:layout_width="0dip"
android:layout_weight="1" android:layout_height="fill_parent">
<TableRow>
<View android:layout_width="0dip" android:layout_weight="1"
android:background="#bbb" android:layout_height="fill_parent"></View>
</TableRow>
</TableLayout>
</TableRow>
在上面的代碼替換爲您希望在那邊的一個......的觀點
相關問題
- 1. 如何使用Android TableLayout創建跨多行的佈局?
- 2. 表格佈局跨越多行
- 3. 與TableLayout跨越列
- 4. Android:如何動態創建此佈局?
- 5. 如何在Android中創建此佈局?
- 6. 如何創建此Android視圖/佈局
- 7. 使用跨越多行的DIV列的頁面佈局
- 8. Android的網格佈局columnSpan不跨越
- 9. RadioGroup可以跨越多個佈局嗎?
- 10. 創建跨越使用MySQL
- 11. 如何用RecyclerView創建此佈局?
- 12. 的Android:哪些佈局創建此
- 13. 如何創建android佈局
- 14. 的Android TableLayout - 跨兩行
- 15. 如何創建此視圖(佈局)
- 16. 我將如何創建此佈局
- 17. 如何在Ionic3中創建此佈局
- 18. 如何在Android中構建此佈局?
- 19. 如何在Android Studio中使用CustomAdapter創建多個佈局ListViews
- 20. 如何在Android上進行此佈局?
- 21. 如何在android中執行此tablelayout?
- 22. 如何創建佈局使用的UITableViewController
- 23. 如何創建完美的佈局android
- 24. 如何使用CSS創建此類佈局?
- 25. 哪種佈局網格佈局或TableLayout適用於Android的
- 26. 使用GridBagLayout使組件跨越多行
- 27. Android應用佈局 - LinearLayout,TableLayout和RelativeLayout呃?
- 28. 創建視圖跨越多個表
- 29. 如何創建使用Sourcetree跨越提交的修補程序?
- 30. Android使用佈局作爲創建多個佈局實例的模板