How exactly does theme inheritance work in Android?
<p>I have the following theme in <code>res/values/styles.xml</code>:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;resources xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;style name="AppBaseTheme" parent="@android:style/Theme.NoTitleBar"&gt;
    &lt;/style&gt;

    &lt;style name="AppTheme" parent="AppBaseTheme"&gt;
        &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
    &lt;/style&gt;
&lt;/resources&gt;
</code></pre>

<p>If I remove the <code>&lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;</code> line, my activities have the titlebar on them. However, if I keep that line there, then they do not have a titlebar (which is what I want).</p>

<p>I'm curious why <code>parent="@android:style/Theme.NoTitleBar"</code> seems to have no effect? Does <code>parent</code> not do what I think it does? I thought it worked like this:</p>

<pre><code>@android:style/Theme.NoTitleBar --&gt; AppBaseTheme --&gt; AppTheme
^                                   ^                ^
|                                   |                |
|                                   |                Has everything AppBaseTheme
|                                   |                does, unless it's overridden
|                                   |
|                                   Has everything @android:style/Theme.NoTitleBar
|                                   does, unless it's overridden (which I'm not
|                                   doing)
|
Sets whatever it needs to to not have a title, which I assume
is done by setting &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
</code></pre>

<p>However, I've also found that if I set <code>&lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;</code> in <code>AppBaseTheme</code> it also has no effect; I have to set it in <code>AppTheme</code>. Then what the heck is the point of specifying the parent?</p>
