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

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

概述我正在开发一个在TableLayout中实现上述属性的应用程序.我想知道有谁可以帮助我并告诉我如何以编程方式而不是在布局文件中这样做?解决方法:在Android文档中查看setColumnStretchable(intcolumnIndex,booleanisStretchable).Makesthegivencolumnstretchableornot.Whe

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

总结

以上是内存溢出为你收集整理的在Android中以编程方式实现android:stretchColumns =“*”全部内容,希望文章能够帮你解决在Android中以编程方式实现android:stretchColumns =“*”所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1114232.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存