0
A
回答
0
使用android:weightSum和android:layout_weight
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="4" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginRight="1dp"
android:layout_weight="2"
android:background="#B0B0B0" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginRight="1dp"
android:layout_weight="2"
android:background="#B0B0B0" />
</TableRow>
</TableLayout>
相關問題
- 1. Android:如何截斷TableLayout中的TextView?
- 2. 在TableLayout中獲取TextView的位置Android
- 3. 在TableLayout中動態調整TextView寬度
- 4. TextView Gravity不能在TableLayout中工作
- 5. Android ScrollView和TableLayout中的等列行
- 6. 即使使用ArrayList中的值,使用TextView的動態TableLayout也是空的
- 7. 爲什麼行中的第二個textview未顯示在tablelayout中?
- 8. Textview寬度的「0dip」切斷了TableLayout中的文本
- 9. 清除LinearLayout中的TableLayout將刪除TextView標題
- 10. 如何在android的tablerow或tablelayout中生成動態textview?
- 11. TableLayout用的TextView和EditText上採用了android工作室
- 12. Android:在固定寬度的TableLayout上動態添加TextView
- 13. TableLayout中的Android wordwrap
- 14. Tablelayout中的Listview android
- 15. TableLayout中的ArrayList IndexOutOfBoundsException
- 16. 需要使TextView出現在TableLayout的同一行中的EditBox旁邊
- 17. 我怎麼知道哪個TextVIew按下TableLayout
- 18. Ellipsize不是一個TextView正常工作在TableLayout
- 19. 當你在一個TableLayout的子項中時,你可以拖放一個TextView嗎?
- 20. TextView在TableLayout中不會被截斷,儘管使用的是ellipsize屬性
- 21. 使TextView粗斜體等
- 22. 等值Matlab中的等值面
- 23. 的Android - TextView中的值設置爲自定義的TextView
- 24. 在asynchtask中添加textview值
- 25. 如何獲得具有相等寬度的2列的TableLayout
- 26. Center Vert。 &Horiz。 TableLayout中的ProgressBar?
- 27. 訪問TableLayout中的內容
- 28. 窗口中的Flowlayout和Tablelayout
- 29. Android開發中的TableLayout
- 30. TableLayout中的列表視圖
至於我也明白了,這個問題可能是由於這樣的事實,你已經把機器人:layout_width =「match_parent」,嘗試給它一個值以符合您的需求 – Abx 2013-05-08 08:19:12
hi Artur,welcome對社區來說,你能否詳細描述一下你的問題? – stinepike 2013-05-08 08:19:41
我不認爲它是一個好主意來模仿其他UI元素,就像在這裏的Android設計指南中所說:http://developer.android.com/design/patterns/pure-android.html – sandkasten 2013-05-08 08:20:25