在Android中以编程方式实现android:stretchColumns =“*”

我正在开发一个在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.

上一篇:配置本地yum源


下一篇:配置软ISCSI存储