title: Android - fix TextView width by string
body: <p>I think the answer to this question is probably so simple, but I'm struggling....</p>
  
  <p>I have a TableLayout with multiple columns. I want the last column to be of a fixed width, but I want to define that width to just be able to hold the widest possible string from my program. i.e. it is always wide enough to contain "THIS STRING" without wrapping, or wasting any space.</p>
  
  <p>I would like to do this as I have these TableLayouts within a ListView, so it looks very poor when the last column is of variable widths.</p>
  
  <p>I have tried obtaining the string width, even going so far as to put it into a TextView, call getTextSize() then setWidth() on all appropriate TextViews. The problem I hit there is that gettextSize() returns pixels, but setWidth uses ScaledPixels.</p>
  
  <p>I'm sure there is a really simple solution. Can anyone help?</p>