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. textView调整为tableLayout中最长的TextView
- 2. TableLayout中的TextView数组
- 3. TableLayout中的TextView高度
- 4. TextView缩小TableLayout
- 5. 左浮动的TextView和TableLayout
- 6. TableLayout中textview和tablerows的布局 - Android
- 7. Android:如何截断TableLayout中的TextView?
- 8. 在TableLayout中获取TextView的位置Android
- 9. TextView Gravity不能在TableLayout中工作
- 10. 在TableLayout中动态调整TextView宽度
- 11. Android ScrollView和TableLayout中的等列行
- 12. 即使使用ArrayList中的值,使用TextView的动态TableLayout也是空的
- 13. 为什么行中的第二个textview未显示在tablelayout中?
- 14. 在TableLayout中的ImageView下居中放置一个TextView
- 15. Textview宽度的“0dip”切断了TableLayout中的文本
- 16. 将TableLayout中的TextView滚动到屏幕的可见区域
- 17. 清除LinearLayout中的TableLayout将删除TextView标题
- 18. 在TableLayout中TextView的动态范围调整
- 19. 如何在android的tablerow或tablelayout中生成动态textview?
- 20. tablelayout不具有相等的宽度
- 21. 如何在一个tableLayout中显示textview数组
- 22. TextView的getLineSpacingExtra C#/ mono等效
- 23. 等待textview的浓咖啡
- 24. TableLayout用的TextView和EditText上采用了android工作室
- 25. TextView与HTML表格与几个TextViews的TableLayout
- 26. Android:在固定宽度的TableLayout上动态添加TextView
- 27. TableLayout中的Android ImageButton
- 28. Tablelayout中的Listview android
- 29. TableLayout中的ArrayList IndexOutOfBoundsException
- 30. TableLayout中的Android wordwrap
至于我也明白了,这个问题可能是由于这样的事实,你已经把机器人: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