title: How to fix my TableLayout and TableRow into specific positions dynamically?
body: <p>I'm having problems setting up my TableRow with some TextViews in TableLayout dynamically. I have two pictures, one is my current situation shown, and the other is my mockup, expected situation (the goal which I need to achieve). I do not have any XML layouts; All of these are created programmatically, which is also something I need to achieve.</p>
  
  <p>The snapshots shown are for a High Score screen, where I get a list of players with high scores, and display them altogether in a TableLayout. I'm just having trouble with the row/column positions.</p>
  
  <p><img src="https://i.stack.imgur.com/K7dyg.png" alt="nothing"></p>
  
  <p>Here's my code:</p>
  
  <pre><code>public void onResume() {
      super.onResume();
  
      //=============================================
      TextView number = new TextView(this);
      number.setText("1");
      TextView place = new TextView(this);
      place.setText("4th");
      TextView testScore = new TextView(this);
      testScore.setText("113489");
      table = new TableLayout(this);
      //rows = new Stack&lt;TableRow&gt;();
      TableRow row = new TableRow(this);
      row.addView(number);
      row.addView(place);
      row.addView(testScore);
      table.addView(row);
      this.setContentView(table);
  }
  </code></pre>
  
  <p>If anyone knows how I should change my code from the Current Situation to the mockup Expected Situation, I gladly appreciate it. If I'm doing something wrong, please post a comment. Thanks in advance.</p>