问题描述
我使用的是Android中一个TableLayout。现在我有一个的TableRow有两个项目在里面,下面的是,有一个项目是它的TableRow。它呈现这样的:
I'm using a TableLayout in Android. Right now I have one TableRow with two items in it, and, below that, a TableRow with one item it it. It renders like this:
-----------------------------
| Cell 1 | Cell 2 |
-----------------------------
| Cell 3 |
---------------
我想要做的是使细胞3横跨两个上的细胞,所以它看起来是这样的:
What I want to do is make Cell 3 stretch across both upper cells, so it looks like this:
-----------------------------
| Cell 1 | Cell 2 |
-----------------------------
| Cell 3 |
-----------------------------
在HTML我会使用一个COLSPAN ....我怎么做这项工作的机器人?
In HTML I'd use a COLSPAN.... how do I make this work in Android?
推荐答案
似乎有一个属性,这样做:layout_span
It seems that there is an attribute doing that :layout_span
更新:此属性必须被施加到的TableRow的儿童。不以自己的TableRow
UPDATE:This attribute must be applied to the children of the TableRow. NOT to the TableRow itself.
这篇关于什么是&QUOT的同等学历;合并单元格"在Android TableLayout?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!