custom attributes are not working for themes in android
<p>In my <code>attr.xml</code>, I have defined <code>descriptor_bg</code> like:</p>

<pre><code>&lt;/declare-styleable&gt;    
    &lt;attr name="descriptor_bg" format="reference|color" /&gt;
    &lt;/declare-styleable&gt;
</code></pre>

<p>and in <code>style.xml</code>:</p>

<pre><code>&lt;style name="Theme_blue"&gt;
    &lt;item name="descriptor_bg"&gt;@android:color/black&lt;/item&gt;
    &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
&lt;/style&gt; 
</code></pre>

<p>I have used above attribute like:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" &gt;
&lt;gradient
    android:angle="90" /&gt;
&lt;solid android:color="@attr/descriptor_bg"/&gt;
&lt;stroke
    android:width="2dp"
    android:color="@color/blue_stroke_bg" /&gt; 
</code></pre>

<p></p>

<p>But I am getting an exception like:</p>

<p><code>android.content.res.Resources$NotFoundException: File res/drawable-mdpi/descriptor_bg.xml</code></p>

<p>from drawable resource ID #0x7f020006</p>

<pre><code>java.lang.UnsupportedOperationException: Can't convert to color: type=0x1
File res/drawable-mdpi/descriptor_bg.xml from drawable resource ID #0x7f020006
</code></pre>

<p>Can anyone please help me?</p>
