xain xain - 1 year ago 104
Android Question

Android table background color

To simulate a grid, I have a tablelayout with background

, tablerow with background
and textviews with background

The entire cell is colored #dcdcdc when the textview has width and height set in fill_parent, but when I add the attribute
, the width fill_parent attribute is discarded. How can I center the text keeping the whole cell with the expected color?

Answer Source

If i understand correctly...you can use


on the TextView to center the text in the view.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download