Romain Guy
2008-04-17 15:13:02 UTC
On your TableRow you must set new TableLayout.LayoutParams and on your
TextViews you must set new TableRow.LayoutParams. The rule is simple:
on a child, set the layout params of its parent.
TextViews you must set new TableRow.LayoutParams. The rule is simple:
on a child, set the layout params of its parent.
Hi guys,
I'm tying to figure out with this problem: I would programmatically
TextView tv_name = new TextView(this);
tv_name.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
tv_name.setText(step_name);
TextView tv_done = new TextView(this);
tv_name.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
tv_done.setAlignment(Layout.Alignment.ALIGN_OPPOSITE);
tv_done.setText(done);
TableRow tr = new TableRow(this);
tr.setLayoutParams(new TableRow.LayoutParams(
TableRow.LayoutParams.FILL_PARENT,
TableRow.LayoutParams.WRAP_CONTENT));
tr.addView(tv_name);
tr.addView(tv_done);
tl.addView(tr);
I've tried everything, but nothings works! Thank you!
I'm tying to figure out with this problem: I would programmatically
TextView tv_name = new TextView(this);
tv_name.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
tv_name.setText(step_name);
TextView tv_done = new TextView(this);
tv_name.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
tv_done.setAlignment(Layout.Alignment.ALIGN_OPPOSITE);
tv_done.setText(done);
TableRow tr = new TableRow(this);
tr.setLayoutParams(new TableRow.LayoutParams(
TableRow.LayoutParams.FILL_PARENT,
TableRow.LayoutParams.WRAP_CONTENT));
tr.addView(tv_name);
tr.addView(tv_done);
tl.addView(tr);
I've tried everything, but nothings works! Thank you!
--
Romain Guy
www.curious-creature.org
Romain Guy
www.curious-creature.org