title: Programmatically change a xml-created view
body: <p>Is there a way to get the parameters from a XML view, modify some stuff on it and then use it as content view ?</p>
  
  <p>Let's say I have a normal LinearLayout and I want to make that work:</p>
  
  <pre><code>LinearLayout layout = (LinearLayout) findViewById(R.layout.main);
  setContentView(layout);
  </code></pre>
  
  <p>Instead of :</p>
  
  <pre><code>setContentView(R.layout.main);
  </code></pre>