title: Using custom attrs in styles.xml in android
body: <p>I made a custom attribute style as</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;declare-styleable name="EffectsTextView"&gt;        
          &lt;attr name="strokeWidth" format="float" /&gt;
          &lt;attr name="strokeMiter" format="float" /&gt;
          &lt;attr name="strokeColor" format="color" /&gt;        
      &lt;/declare-styleable&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>In Layout file, I could use this custom attribute assigning a namespace for this attribute:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"    
  xmlns:effects="http://schemas.android.com/apk/res-auto/com.base.view.EffectsTextView"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:background="#40000000" &gt;
  
   &lt;com.base.view.EffectsTextView
          android:id="@+id/textView1"
          android:layout_width="290dip"
          android:layout_height="80dip"
          android:layout_marginLeft="5dip"
          android:layout_marginTop="16dip"
          android:gravity="center"
          android:text="SETTINGS"
          android:textSize="44dip"
          android:textStyle="bold"  
          effects:strokeWidth="10"  /&gt;    &lt;--- custom tag "effects"
  </code></pre>
  
  <p>However it was not recognizing this custom tag in styles.xml</p>
  
  <pre><code>&lt;style name="EffectsHeaderTextStyle"&gt;
       &lt;item name="effects:strokeWidth"&gt;10&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>Error: No resource found that matches the given name, effects, though I put the namespace same as I did in RelativeLayout file. </p>
  
  <p>Any ideas? Thanks</p>