It's really simple! :) It works! Thank you Romain!
On Apr 17, 5:13 pm, "Romain Guy" <[EMAIL PROTECTED]> wrote: > 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. > > > > On Thu, Apr 17, 2008 at 8:05 AM, Pzikit Bloo <[EMAIL PROTECTED]> wrote: > > > Hi guys, > > I'm tying to figure out with this problem: I would programmatically > > add rows to my TableLayout; here's the code: > > > 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 Guywww.curious-creature.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

