TableRow not displaying all TextViews
<p>I am creating a TableRow at runtime. The trouble I have is that I have 6 TextViews created and added to the TableRow but for some reason only 3 of the TextViews appear, the 1st 2 and the last one. I know that there is no problem adding the TextView to the TableRow because if I comment out the last 2 TextViews the fourth one still overwrites the third. Because of this it seems to be that there is a limit somewhere on the number of columns I can add to this TableRow.</p>

<p>Any ideas where I am going wrong?</p>

<p>Here is my java</p>

<pre><code>public class locationlist extends Activity {
    /** Called when the activity is first created. */
    private locationListDbAdapter mDbHelper;


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
       setContentView(R.layout.locationlist);
        mDbHelper = new locationListDbAdapter(this);
        mDbHelper.open();

        String id = mDbHelper.fetchRow(1).getString(0);
        String locationText  = mDbHelper.fetchRow(1).getString(1);
        String localCode = mDbHelper.fetchRow(1).getString(2);
        String localService = mDbHelper.fetchRow(1).getString(3);
        String localComments = mDbHelper.fetchRow(1).getString(4);
        String localNextes = mDbHelper.fetchRow(1).getString(5);



        TextView idView = new TextView(this);
        idView.setText(id);
        TextView locationView = new TextView(this);
        locationView.setText(locationText);
        TextView codeView = new TextView(this);
        codeView.setText(localCode);
        TextView serviceView = new TextView(this);
        codeView.setText(localService);
        TextView commentsView = new TextView(this);
        codeView.setText(localComments);
        TextView nextesView = new TextView(this);
        codeView.setText(localNextes);

        TableLayout tl = (TableLayout)findViewById(R.id.tableLayout1);
        TableRow r2 = new TableRow(this);


        r2.addView(idView);
        r2.addView(locationView);
        r2.addView(codeView);
        r2.addView(serviceView);
        r2.addView(commentsView);
        r2.addView(nextesView);
        tl.addView(r2);

        this.setContentView(tl);
</code></pre>

<p>This is the xml file I am pointing it at</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

    &lt;TableLayout android:id="@+id/tableLayout1" android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content"&gt;
        &lt;TableRow android:layout_height="wrap_content" android:id="@+id/tableRow1" android:layout_width="fill_parent"&gt;
            &lt;TextView android:id="@+id/textView11" android:layout_height="wrap_content" android:text="ID" android:layout_width="0dip" android:layout_weight="0.1"&gt;&lt;/TextView&gt;
            &lt;TextView android:id="@+id/textView1" android:layout_height="wrap_content" android:text="Location" android:layout_width="0dip" android:layout_weight="0.4"&gt;&lt;/TextView&gt;
            &lt;TextView android:id="@+id/textView2" android:layout_height="wrap_content" android:text="Type" android:layout_width="0dip" android:layout_weight="0.15"&gt;&lt;/TextView&gt;
            &lt;TextView android:id="@+id/textView3" android:layout_height="wrap_content" android:text="Service" android:layout_width="0dip" android:layout_weight="0.2"&gt;&lt;/TextView&gt;
            &lt;TextView android:id="@+id/textView4" android:layout_height="wrap_content" android:text="Comments" android:layout_weight="0.3" android:layout_width="0dip"&gt;&lt;/TextView&gt;
            &lt;TextView android:id="@+id/textView5" android:layout_height="wrap_content" android:text="ES" android:layout_width="0dip" android:layout_weight="0.15"&gt;&lt;/TextView&gt;
        &lt;/TableRow&gt;
            &lt;View
        android:layout_height="2dip"
        android:background="#FF909090" /&gt;
    &lt;/TableLayout&gt;
</code></pre>
