views:

38

answers:

1

Hello Everyone.

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?

+1  A: 

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

mbaird
The only other option is fill parent.
Mitchell
I guess that worked though. :D
Mitchell
I wouldn't say fill_parent is the ONLY other option. You can always specify a set width in pixels or dip or something. You can also set it to 0 and use the layout_weight attribute to control how it expands.
mbaird