Android 布局中视图元素的左右对齐
如何让视图将自己定位在 TableLayout 行的左侧、右侧和中心位置?还是线性布局?
How do you get a view to position itself left, right and center in a TableLayout row? Or linear layout?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用android:gravity属性来设置您想要的对齐方式。
使用 TableLayout 时,请查找 steachColoum 属性。如果您希望所有表格列自动调整,也请加上*。
You can use the android:gravity property to set the alignment you want.
When working on the TableLayout, look for the streachColoum property. Also make it * if you want all the table columns to auto fit.