Android:stretchColumns

15
我猜我在这里没有找到一个好的解释。那么,可以有人告诉我android:stretchColumns实际上是做什么的吗?我在我的表中使用了它,并尝试了几个不同的值,但似乎无法弄清它正在做什么。
对于这个愚蠢的问题感到抱歉!

如果你需要将来的参考资料,可以访问这个博客:http://android-pro.blogspot.com/2010/02/table-layout.html。 - InfZero
1个回答

17
A TableLayout can specify certain columns as shrinkable or stretchable

by calling setColumnShrinkable() or setColumnStretchable(). If marked as shrinkable, the column width can be shrunk to fit the table into its parent object. If marked as stretchable, it can expand in width to fit any extra space. The total width of the table is defined by its parent container.

请看这里,记住如果你的表格很好地适合父元素(没有剩余空间可伸展),无论您输入什么值,都不会看到任何更改。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接