开发者

Centering Text In A TextView

I have a TextView that has text Dynamically Added to it. My problem is that when I use gravity for the centering the text, it doesn't move because the width is set to "wrap_content".

What should I do to re开发者_StackOverflowsolve this issue?


You're going to have to set the width to something other than "wrap_content".


I know the answer has already been accepted here but you could have also set the layout_gravity to center too and then wrap_content would still work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜