title: Finding layouts by id
body: <p>Noob here.</p>
  
  <p>I am trying to spawn an image on a button click, in order to do that I took some code from this question: <a href="https://stackoverflow.com/questions/2994494/how-do-i-create-an-imageview-in-java-code-within-an-existing-layout">How do I create an ImageView in java code, within an existing Layout?</a>
  I used the code from the first answer, but In the line:</p>
  
  <pre><code>    RelativeLayout rl = (RelativeLayout) findViewById(R.id.RelativeLayout01);
  </code></pre>
  
  <p>I don't know what to put instead of "RelativeLayout01", or how to have a layout in "id"</p>
  
  <p>Thanks in advance</p>