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.
精彩评论