如何改善TextView的对齐方式?

时间:2021-08-02 06:43:56

如何改善TextView的对齐方式?

Right-most textview is causing some alignment issues. I'm not sure how I can alleviate this?

最右边的textview导致一些对齐问题。我不确定如何缓解这个问题?

2 个解决方案

#1


0  

Set the Layout Width on the right-most textview to a hard-coded values such as 100dip and set the Gravity to right.

将最右侧文本视图的“布局宽度”设置为硬编码值(如100dip),并将“重力”设置为右侧。

#2


1  

if you're using LinearLayout you could use weight to set width of all TextView's in a row

如果您使用的是LinearLayout,则可以使用权重来设置所有TextView的宽度

#1


0  

Set the Layout Width on the right-most textview to a hard-coded values such as 100dip and set the Gravity to right.

将最右侧文本视图的“布局宽度”设置为硬编码值(如100dip),并将“重力”设置为右侧。

#2


1  

if you're using LinearLayout you could use weight to set width of all TextView's in a row

如果您使用的是LinearLayout,则可以使用权重来设置所有TextView的宽度