我正在开发一个在TableLayout中实现上述属性的应用程序.
我想知道有谁可以帮助我并告诉我如何以编程方式而不是在布局文件中这样做?
解决方法:
在Android文档中查看setColumnStretchable (int columnIndex, boolean isStretchable)
.
Makes the given column stretchable or not. When stretchable, a column
takes up as much as available space as possible in its row. Calling
this method requests a layout operation.
setStretchAllColumns (boolean stretchAllColumns)
–
Convenience method to mark all columns as stretchable.