Reputation: 929
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 resolve this issue?
Upvotes: 1
Views: 1858
Reputation: 7990
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.
Upvotes: 1
Reputation: 200501
You're going to have to set the width to something other than "wrap_content".
Upvotes: 2