tags:

views:

55

answers:

1

Hey Everyone,

I am trying to implement a TextView that is serving as a header for a ListView. I want to format it so that I have basically a title centered on the first line and then additional information on the lines following. How can I format the text/string to create this kind of formatting?

Thanks, Rob

+1  A: 

I suggest you use addHeaderView to specify you header. This way you can use separate XML layout to define the header.

You can then use gravity to be more specific with the layout

Ravi Vyas
Good idea. For some reason I was thinking that the header would need to be something like a TextView but I guess it would work fine to create a LinearLayout and hand it that?Thanks again.
Tarmon