title: add view dynamically in a fragment
body: <p>I need to show some information in an agenda style, so i'm using fragment to show the information in the different days. Every day have some column to showing the room.</p>
  
  <p>I create the structure but i have some problem when i try to put inside the information</p>
  
  <p><b>agenda_child_tv - textview where i put the peace of information</b></p>
  
  <pre><code>&lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/text_child"
      android:layout_width = "match_parent"
      android:layout_height = "wrap_content"
      android:clickable="true"
      android:background="@drawable/back"
      android:padding="3sp"/&gt;
  </code></pre>
  
  <p><b>agenda_child_ll - the colum</b></p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="@dimen/agenda_aula_width"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
  &lt;TextView
      android:id="@+id/agenda_aula_title" 
      android:layout_width="match_parent"
      android:layout_height="match_parent"/&gt;
  
      &lt;LinearLayout  
          android:id="@+id/agenda_aula_esp"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical" &gt;
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><b>agenda_day</b></p>
  
  <pre><code>&lt;HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
  &lt;ScrollView 
      android:layout_width="wrap_content"
      android:layout_height="match_parent" &gt;
  
          &lt;LinearLayout
              android:id="@+id/horizontal_fragment"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"&gt;
  
              &lt;LinearLayout
                  android:layout_width="@dimen/agenda_tv_width"
                  android:layout_height="wrap_content"
                  android:orientation="vertical"
                  android:background="#BDBDBD" &gt;
  
                  &lt;TextView 
                      android:layout_width="@dimen/agenda_tv_width"
                      android:layout_height="@dimen/agenda_tv_height"
                      android:text="9.00"
                      android:padding="@dimen/agenda_tv_padding"
                      android:textColor="@color/agenda_orario_color"
                      android:textSize="@dimen/agenda_tv_textsize" /&gt;
  
                  &lt;!-- A lot of textview for the hours --&gt;
  
              &lt;/LinearLayout&gt;
  
              &lt;!-- Here i put, dinamically, the colum for the room in each day --&gt; 
  
      &lt;/LinearLayout&gt;
  
  &lt;/ScrollView&gt;
  
  &lt;/HorizontalScrollView&gt;
  </code></pre>
  
  <p><b>Agenda</b></p>
  
  <p>The code below is not very dynamically but i wrote a simplified versione to show you my problem</p>
  
  <pre><code>public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
  
      View rootView = inflater.inflate(R.layout.agenda_day, container, false);
  
      LinearLayout dayLL = (LinearLayout) rootView.findViewById(R.id.horizontal_fragment);
  
      //Retriving LL agenda_child_ll
          LinearLayout aula = (LinearLayout) inflater.inflate(R.layout.agenda_child_ll, container, false);
  
          //Setting the classroom name
          TextView aulaName = (TextView) aula.findViewById(R.id.agenda_aula_title);
          aulaName.setText("room A");
  
          //Retriving LL agenda_aula_esp
          LinearLayout roomLL = (LinearLayout) aula.findViewById(R.id.agenda_aula_esp);
  
          //Retriving TV child
          TextView child = (TextView) inflater.inflate(R.layout.agenda_child_tv, container, false);
          child.setText("test");
  
          //Adding child to the room
          roomLL.addView(child);
  
          //adding room to the day
          dayLL.addView(aula);
  
          //Creating the column for the classroom "room B"
  
          LinearLayout aula2 = (LinearLayout) inflater.inflate(R.layout.agenda_child_ll, container, false);
  
          TextView aulaName2 = (TextView) aula2.findViewById(R.id.agenda_aula_title);
          aulaName2.setText("room B");
  
          dayLL.addView(aula2);
  }
  </code></pre>
  
  <p>This is the result. The textview child wasn't added to the layout.
  Can someone help me? :)</p>
  
  <p><a href="http://img688.imageshack.us/img688/2566/avdm.png" rel="nofollow">image of the result</a></p>