Can a selector resource use a color defined in a style?
<p>I'm trying to use a color defined in a stlyle in a selector but it is causing a Resources$NotFoundException.</p>

<p>First I added a new attribute to attr.xml:</p>

<pre><code>&lt;resources&gt;
    &lt;attr name="unread_background" format="color" /&gt;
&lt;/resources&gt;
</code></pre>

<p>Then I defined that attr value in styles.xml:</p>

<pre><code>&lt;style name="ThemeNoTitleBar" parent="android:Theme.NoTitleBar"&gt;
    &lt;item name="unread_background"&gt;#000000&lt;/item&gt;
&lt;/style&gt;
</code></pre>

<p>Then I tried to use that attr in my selector definition:</p>

<pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;!-- other states snipped --&gt;
    &lt;item android:state_selected="false"
        android:drawable="?unread_background" /&gt;
&lt;/selector&gt;
</code></pre>

<p>Lastly, the activity uses the ThemeNoTitleBar style theme in the manifest.</p>

<p>I've also tried creating a color in colors.xml and having it use the new attr but that also fails.</p>

<p>I'm obviously missing something but am not sure what to do to fix it.  My intent is to create multiple themes and have the selector use the color in the currently selected theme.</p>
