title: Problems defining my own Android theme
body: <p>Is there anything wrong with this XML? I don't get any compile time errors, but anytime I try to edit it, Eclipse gives me a nullpointerexception. Why?</p>
  
  <p><strong>/res/values/styles.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;resources&gt;
        &lt;!-- Base application theme is the default theme. --&gt;
        &lt;style name="Theme" parent="android:Theme"&gt;
        &lt;/style&gt;
  
        &lt;!-- Variation on our application theme that has a translucent
       background. --&gt;
        &lt;style name="Theme.Translucent"&gt;
          &lt;item name="android:windowBackground"&gt;@drawable/translucent_background&lt;/item&gt;
          &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
          &lt;item name="android:colorForeground"&gt;#fff&lt;/item&gt;
        &lt;/style&gt;
  
        &lt;!-- Variation on our application theme that has a transparent
      background; this example completely removes the background,
      allowing the activity to decide how to composite. --&gt;
        &lt;style name="Theme.Transparent"&gt;
          &lt;item name="android:windowBackground"&gt;@drawable/transparent_background&lt;/item&gt;
          &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
          &lt;item name="android:colorForeground"&gt;#fff&lt;/item&gt;
        &lt;/style&gt;
        &lt;style name="TextAppearance.Theme.PlainText" parent="android:TextAppearance.Theme"&gt;
          &lt;item name="android:textStyle"&gt;normal&lt;/item&gt;
        &lt;/style&gt;
  
      &lt;/resources&gt;
  </code></pre>