title: Loading views from a common XML file
body: <p>I'd like to have a commons.xml layout file, storing various subviews and being able to inflate the single views by code.</p>
  
  <p>The goal is having being able to load buttons, labels, etc via <code>findViewById()</code> from a xml file and being able to add them to a MergeAdapter via <code>MergeAdapter.addView(View v)</code>.</p>
  
  <pre><code>//the following works
  TextView text = new TextView(this);     
  text.setText("hellooo");
  mMergeAdapter.addView(text);
  
  //but how to instantiate the object from the xml definition ?
  TextView text =  **???**  //R.layout.commons.xml, mytextviewid  
  text.setText("sigh :(");
  mMergeAdapter.addView(text);
  </code></pre>
  
  <p>Commons.xml may be as simple as:</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="fill_parent"
      android:layout_height="fill_parent"
  &gt;
      &lt;TextView android:id="@+id/mytextviewid" 
          android:layout_height="fill_parent" 
          android:layout_width="fill_parent"      
      /&gt;
      &lt;Button android:id="@+id/mybutton" 
          android:layout_height="fill_parent" 
          android:layout_width="fill_parent"      
      /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I have no special performance requirements.</p>