I have table, which is described in main xml layout. I need to know, if there is any chance to set layout to each table row, so I don't need to recreate each time? Where layout is simple, I can do that by code, but at this time layout is pretty complicated.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ebank_saskaitos);
this.setFirstBlock();
}
private void setFirstBlock() {
TableLayout ll = (TableLayout) findViewById(R.id.first_block);
ll.addView(this.tableChild());
}
private TableRow tableChild() {
TableRow tr = new TableRow(this);
//row implementation
return tr;
}