Content not showing in dynamically created android TableLayout
I'm trying to make a 3-column TableLayout but I never see anything. Here's my java code: TableLayout tl = (TableLayout)findViewById(R.id.tableLayout1); TableRow tr = new TableRow(this); tr.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); TextView tv = new TextView(this); tv.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); tv.setText(data[0]); tr.addView(tv); TextView tv1 = new TextView(this); tv1.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); tv1.setText(data[1]); tr.addView