title: Problem to add View dynamically in Linearlayout
body: <p>I want to add multiple View in a <code>LinearLayout</code>. Here is the code I am using for add adding multiple view to the <code>LinearLayout</code>.</p>
  
  <p><strong>Java code:</strong></p>
  
  <pre><code>LinearLayout seriesMainListItemView = (LinearLayout) findViewById(R.id.SeriesMainListItemView);
                  LayoutInflater mInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
                  for (int i=0; i&lt;scheduleArr.length; i++) {
  
                        View inflatedView = mInflater.inflate(R.layout.scheduleitem, null);
                        TextView inflatertext1 = (TextView) inflatedView.findViewById(R.id.text1);
                        TextView inflatertext2 = (TextView) inflatedView.findViewById(R.id.text2);
                        inflatertext1.setText(scheduleArr[i][0]);
                        inflatertext2.setText(scheduleArr[i][1]);
                        Log.i("data",i + " " + scheduleArr[i][0] + "/" + scheduleArr[i][1]);
                        seriesMainListItemView.addView(inflatedView);
                  }
  </code></pre>
  
  <p>Here is the View xml I want to add multiple times.</p>
  
  <p>
      
          
          <br>
      </p>
  
  <p>Here is the LinearLayout where I want to add it.</p>
  
  <pre><code>&lt;TableLayout
                  android:layout_gravity="center_vertical" 
                  android:layout_width="fill_parent" 
                  android:layout_height="fill_parent"
                  android:paddingLeft="1dip"
                  android:paddingRight="1dip" &gt;
                   &lt;TableRow
                      android:layout_width="fill_parent"
                      android:layout_height="fill_parent"&gt;
                      &lt;ImageView
                         android:id="@+id/imgSeriesMainScheduleImg"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_gravity="center"
                         android:background="@drawable/scheduleheader"/&gt; 
                      &lt;LinearLayout  
                          android:id="@+id/SeriesMainListItemView"                                    
                          android:layout_width="fill_parent"
                          android:layout_height="fill_parent"&gt;
                      &lt;/LinearLayout&gt;                                                                                              
                  &lt;/TableRow&gt;
  ..............
  &lt;/TableLayout&gt;
  </code></pre>
  
  <p>But only single view is adding in the LinearLayout, although length of the array is 3. What is the problem in my code?</p>