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