Hi, I'm not able to add a row with this code... someone can help me? BASIC XML: <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:layout_height="fill_parent" android:layout_width="fill_parent" android:id="@+id/MainLayout"> <TableRow> <RelativeLayout android:id="@+id/RelativeLayout01"> <ToggleButton android:id="@+id/ToggleButton01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" /> <RadioButton android:id="@+id/RadioButton01" android:layout_width="wrap_content" android:layout_height="40px" android:clickable="false" android:layout_toRightOf="@+id/ ToggleButton01" android:layout_marginRight="10px"></RadioButton> <TextView android:id="@+id/text01" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_width="215px" android:textStyle="bold" android:singleLine="false" android:text="disfj iosd jfsdoi " android:layout_toRightOf="@+id/RadioButton01" /> <TextView android:id="@+id/TextView01" android:layout_below="@id/ text01" android:layout_height="wrap_content" android:text="dfj sdoijf oisd" android:layout_toRightOf="@+id/RadioButton01" android:layout_width="220px"></TextView> </RelativeLayout> </TableRow> </TableLayout>
JAVA CODE package apaella.android; import android.app.Activity; import android.os.Bundle; import android.widget.TableLayout; import android.widget.TableRow; import android.widget.TextView; public class Test extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TableLayout table = (TableLayout) findViewById(R.id.MainLayout); TableRow row = new TableRow(this); TextView label = new TextView(this); label.setText("fspofsopdkfopsd"); label.setPadding(3, 3, 3, 3); row.addView(label, new TableRow.LayoutParams(1)); table.addView(row, new TableLayout.LayoutParams()); } } Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---