title: Android: How to get an XML layout from a different contentview
body: <p>I am in the contentview of seekbarlist.xml and need to get the layout of seekbars.xml. 
  I need to send the layout to CustomSeekBar constructor. Below, you can see that I tried to set the content view to one layout, grab it, then switch to the other. This will not work b/c I have to extend listactivity and the layout must have an item with the id "list". seekbars.xml does not have a "list" and it would not make sense for it to have it.
  How can I get the layout of seekbars?</p>
  
  <pre><code> public class ColorsActivity extends ListActivity {
  /** Called when the activity is first created. */
  
  //Array Adapter that will hold our ArrayList and display the items on the ListView
  SeekBarAdaptor seekBarAdaptor;
  
  //List that will  host our items and allow us to modify that array adapter
  ArrayList&lt;CustomSeekBar&gt; seekBarArrayList=null;
  // TextView myValueText;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.seekbars);
      LinearLayout myLayout = (LinearLayout)findViewById(R.layout.seekbars);
  
      setContentView(R.layout.seekbarlist);
  
      //Initialize ListView        
      ListView lstTest= getListView();
  
  
       //Initialize our ArrayList
      seekBarArrayList = new ArrayList&lt;CustomSeekBar&gt;();
  
      //Initialize our array adapter 
      seekBarAdaptor = new SeekBarAdaptor(ColorsActivity.this, R.layout.seekbars, seekBarArrayList);
  
      CustomSeekBar red = new CustomSeekBar(this, myLayout, "red", 1);
      //CustomSeekBar blue = new CustomSeekBar(this, "blue");
      //CustomSeekBar green = new CustomSeekBar(this, "green");
  
      //Set the above adapter as the adapter of choice for our list
      lstTest.setAdapter(seekBarAdaptor);
  
      seekBarArrayList.add(red);
      //seekBarArrayList.add(blue);
      //seekBarArrayList.add(green);
  
      Amarino.connect(this, "00:11:11:21:05:53");
   }
  
  }
  </code></pre>