title: Column of same width in TableLayout, *programmatically*
body: <p>I read on SO that in order to obtain a tablelayout where each column has the same width, you can set <code>android:width="0dp"</code> and <code>android:weight="1"</code> as layout parameter and it works.
  I would obtain the same result, but programmatically, so I tried this chunk of code:</p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      View rootView = inflater.inflate(R.layout.fragment_score, container, false);
  
      TableRow row = (TableRow)rootView.findViewById(R.id.playerRow);
      for (Player p : game.getPlayers()) {
          TextView t = new TextView(rootView.getContext());
          t.setText(p.getName());
          row.addView(t, new TableLayout.LayoutParams(0, TableLayout.LayoutParams.WRAP_CONTENT, 1f));
          // with the previuos line of code, nothing is showed
          // instead this work: row.addView(t) , but each column doesn't take the maximum width (as I would)
  
      }
  
      return rootView;
  }
  </code></pre>
  
  <p>But as explained in comment, it doesn't work as expected.
  I can't get what I am missing.</p>