title: Programmatically Changing a XML file?
body: <p>I have a XML file that I set up to tell the app what image to use as the splash screen. However, I have multiple images that can be used depending on the screen size. I have the following code to determine the screen size:</p>
  
  <pre><code>Display display = getWindowManager().getDefaultDisplay(); 
  int width = display.getWidth();
  int height = display.getHeight();
  </code></pre>
  
  <p>Note: I'm using getWidth and getHeight because my app is using API 7. I do know that they were deprecated later on.</p>
  
  <p>Anyways, here is what I have in my XML file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  &lt;style name="Theme.Splash" parent="android:Theme"&gt;
      &lt;item name="android:windowBackground"&gt;@drawable/splash_screen&lt;/item&gt;
      &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
  &lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>Basically, what I want to be able to do is be able to programmatically change splash_screen to whatever the name of my file is depending on the screen size. Any ideas how I can change the XML file from my code?</p>
  
  <p>Thanks in advance for any help given.</p>