title: add Layout programmatically inside another one
body: <p>I have an xml file (option_element.xml) that contains a ImageView and a TextView</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_marginTop="-18dp" &gt;
  
      &lt;ImageView
          android:id="@+id/button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"
          android:src="@drawable/option_button" /&gt;
  
      &lt;TextView
          android:id="@+id/text"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignBottom="@+id/button"
          android:layout_alignLeft="@+id/button"
          android:layout_alignRight="@+id/button"
          android:layout_alignTop="@+id/button"
          android:layout_centerHorizontal="true"
          android:gravity="center" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I should fill a LinearLayout with this View, based on a content of an array</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="wrap_content"
      android:orientation="vertical" &gt;
  
      &lt;LinearLayout
          android:id="@+id/options_list"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical" /&gt;
  
      &lt;!-- other layout elements --&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I'm adding it like</p>
  
  <pre><code>LinearLayout options_layout = (LinearLayout) findViewById(R.id.options_list);
  String[] options = getActivity().getResources().getStringArray(R.array.options);
  for (int i = 0; i &lt; options.length; i++) {
      View to_add = inflater.inflate(R.layout.options_element,
                  options_layout);
  
      TextView text = (TextView) to_add.findViewById(R.id.text);
      text.setText(options[i]);
      text.setTypeface(FontSelector.getBold(getActivity()));
  
  }
  </code></pre>
  
  <p>But something gone wrong. I'm expecting options.length ImageView with relative TextView filled with options[i] text, but i obtain options.length ImageView, but only first one has text (and text it's not options[0] element, but last one).</p>
  
  <p>For example, if option contains {"one", "two", "three"} inside first imageView i get "three", and other ones are empty.
  How can put each string inside each TextView?</p>