title: AlertDialog styling - how to change style (color) of title, message, etc
body: <p>I've breaking my head over this quite a bit. What I need to do is, change the style of all <code>AlertDialog</code>s in my android application - dialog background needs to be white-ish, and text needs to be black-ish. I tried creating a lot of styles, themes, and applying from the code, manifest, etc, but no success, with regard to the text colors inside the <code>AlertDialog</code>. Right now, I have the simplest of codes, set like this:</p>
  <p>Manifest:</p>
  <blockquote>
  <pre><code>&lt;application
      android:icon=&quot;@drawable/ic_launcher&quot;
      android:label=&quot;@string/app_name&quot;
      android:theme=&quot;@style/AppTheme&quot; &gt;
  </code></pre>
  </blockquote>
  <p>styles.xml:</p>
  <blockquote>
  <pre><code>&lt;style name=&quot;AppTheme&quot; parent=&quot;AppBaseTheme&quot;&gt;
      &lt;item name=&quot;android:alertDialogStyle&quot;&gt;@style/DialogStyle&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name=&quot;DialogStyle&quot; parent=&quot;@android:style/Theme.Dialog&quot;&gt;
      &lt;!-- changing these background stuff works fine --&gt;
      &lt;item name=&quot;android:bottomBright&quot;&gt;@android:color/white&lt;/item&gt;
      &lt;item name=&quot;android:bottomDark&quot;&gt;@android:color/white&lt;/item&gt;
      &lt;item name=&quot;android:bottomMedium&quot;&gt;@drawable/dialog_footer_bg&lt;/item&gt;
      &lt;item name=&quot;android:centerBright&quot;&gt;@android:color/white&lt;/item&gt;
      &lt;item name=&quot;android:centerDark&quot;&gt;@drawable/dialog_body_bg&lt;/item&gt;
      &lt;item name=&quot;android:centerMedium&quot;&gt;@android:color/white&lt;/item&gt;
      &lt;item name=&quot;android:fullBright&quot;&gt;@color/orange&lt;/item&gt;
      &lt;item name=&quot;android:fullDark&quot;&gt;@color/orange&lt;/item&gt;
      &lt;item name=&quot;android:topBright&quot;&gt;@color/green&lt;/item&gt;
      &lt;item name=&quot;android:topDark&quot;&gt;@drawable/dialog_header_bg&lt;/item&gt;
  </code></pre>
  </blockquote>
  <p>The items listed below don't work (please read the comments I've put above each element):</p>
  <blockquote>
  <pre><code>    &lt;!-- panelBackground is not getting set to null, there is something squarish around it --&gt;
      &lt;item name=&quot;android:panelBackground&quot;&gt;@null&lt;/item&gt;
  
      &lt;!-- Setting this textColor doesn't seem to have any effect at all. Messages, title, button text color, whatever; nothing changes. --&gt;
      &lt;item name=&quot;android:textColor&quot;&gt;#000000&lt;/item&gt;
  
      &lt;!-- Also tried with textAppearance, as follows. Didn't work --&gt;
      &lt;item name=&quot;android:textAppearance&quot;&gt;?android:attr/textColorPrimaryInverse&lt;/item&gt;
  
      &lt;!-- Also tried changing textAppearancePrimary, to no avail --&gt;
      &lt;item name=&quot;android:textColorPrimary&quot;&gt;#000000&lt;/item&gt;
  
      &lt;!-- Also need to change the dialog title text, tried it as follows, dint work: --&gt;
      &lt;item name=&quot;android:windowTitleStyle&quot;&gt;@style/DialogWindowTitle&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  </blockquote>
  <p>The DialogWindowTitle is defined as follows:</p>
  <blockquote>
  <pre><code>&lt;style name=&quot;DialogWindowTitle&quot;&gt;
      &lt;item name=&quot;android:textAppearance&quot;&gt;?android:attr/textAppearanceMediumInverse&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  </blockquote>
  <p>So none of these is working. Can anyone tell me what I could be doing wrong, and how can I:</p>
  <ol>
  <li>Change text color for messages (content text)</li>
  <li>Change title text color</li>
  <li>Remove the
  panel background</li>
  </ol>
  <p>Note: I need to support API 8 (2.2) upwards. Also, I've went through most of the related question here, and google groups, but can't figure out, though I have a feeling its right under my nose!</p>
  <p>Edit: adding screenshot:</p>
  <p><img src="https://i.stack.imgur.com/4ArTR.png" alt="AlertDialog not themed as expected" /></p>