title: Android: using XML layout from internal storage
body: <p>Stackoverflow has helped me tremendously with my projects. Thank you for that. Now here's my problem:</p>
  
  <p>I've made an app for a company. This company has many customers who will be using the app. The company would like to customize the app layout per customer. They would like to change the background color of elements &amp; button images, among other things.</p>
  
  <p>Now, I'd like to: </p>
  
  <ul>
  <li>download a customized xml layout from their server</li>
  <li>download customized button images etc.</li>
  </ul>
  
  <p>(Both of these are currently loaded from resources.) Then:</p>
  
  <ul>
  <li>use those to style the app.</li>
  </ul>
  
  <p>So, the downloading won't be a problem. The storing of the data in the internal storage won't be a problem either. But.</p>
  
  <p>How do I tell the app to use the customized xml layout, which can be found in the internal storage? Up until now I've used this.</p>
  
  <pre><code>setContentView(R.layout.activity_main);
  </code></pre>
  
  <p>Now, I want to set do the same, but based on an XML found in internal storage. </p>
  
  <p>In addition, I'd like to load images for buttons etc. from the internal storage too, instead of from resources. Right now I use this:</p>
  
  <pre><code>findViewById(R.id.button_x).setBackgroundResource(R.drawable.button02);
  </code></pre>
  
  <p>So, in short, my question is:</p>
  
  <p><strong>Is there a way to achieve the functionality of the code above, but with files from the internal storage?</strong></p>