Shawn Lauzon Shawn Lauzon - 24 days ago 7
Android Question

Table row wider than phone width

I have a TableRow with a decent amount of text in one of the columns. This text causes the table to be wider than the width of the phone, and so the right side of the data is cutoff.

I would like to wrap the text to the next row, but I can't tell how to do this. I tried setting singleLine="false", but that doesn't seem to do anything. Alternatively, I would be ok truncating the data, but there doesn't seem to be a great way of doing this either.

Answer

I ended up using a LinearLayout instead of a TableLayout. This does wordwrap by default and is close enough to TableLayout for my use.