如何让视图将自己定位在 TableLayout 行的左侧、右侧和中心位置?还是线性布局?
How do you get a view to position itself left, right and center in a TableLayout row? Or linear layout?
您可以使用android:gravity属性来设置您想要的对齐方式。
<TableRow android:gravity="center"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center"> </LinearLayout> </TableRow>
使用 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.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(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.