Adding items to LinearLayout (and resizing)
<p>I have the following layout</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:background="#f00"
    android:id="@+id/main_layout"&gt;
    &lt;LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:background="#0f0"
        android:id="@+id/bed_list"/&gt;
    &lt;TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#00f"
        android:text="Howdy cowboy?"
        android:textSize="50dip"
        android:textColor="#fff"
        android:id="@+id/textview"/&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>I want to add some textviews to R.id.bed_list (as if they were vertical tabs)</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  this.setContentView(R.layout.main);

  LinearLayout bedList = (LinearLayout) findViewById(R.id.bed_list);

  for (int i = 0; i &lt; 12; i++) {
    System.out.println("In the loop");
    TextView textView = new TextView(this);
    textView.setText("HJM-" + i);
    textView.setWidth(LinearLayout.LayoutParams.WRAP_CONTENT);
    textView.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT);
    bedList.addView(textView,i,
      new LinearLayout.LayoutParams(
        LinearLayout.LayoutParams.WRAP_CONTENT,
        LinearLayout.LayoutParams.WRAP_CONTENT));
  }
}
</code></pre>

<p>So far, the code is run, the System.out.println messages in the loop appear at the console, but I only see the textview (<code>R.id.textview</code>). I wanted the list to appear at the left of the screen with the options calculated, but it does not work.</p>

<p>Further on, if I define a first textview in the label (so that there is some items at the very beginning and a space is reserved), I get to see that textview but the others (added from the program) do not appear either.</p>
