For each i
you have to create a new instance for the TableRow
View and then add it to the TableLayout
.
So you code should be like this :
for(int i = 1; i <=4; i++) {
row = new TableRow(this);
LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.row_per_person, table);
row.addView(inflater); // add view to row
table.addView(row); // add to table
}