title: Custom View attributes are not accessible in xml android
body: <p>I am trying to set <strong>drawable in xml of my CustomView</strong>. but it is not showing my <code>app:enableProgressRes="@drawable/vbequalizer_bg"</code>  or <code>customname:enableProgressRes="@drawable/vbequalizer_bg"</code> </p>
  
  <p>I mean <em>custom attributes are not included</em>. As we hit <code>Ctrl+Space</code> android:attr  shows.</p>
  
  <blockquote>
    <p>And i have tried including these namespaces one by one to the Root Layout.</p>
  </blockquote>
  
  <pre><code>xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:custom="http://schemas.android.com/apk/res-auto"
  xmlns:customname="http://schemas.android.com/apk/res/zare.custom.views"
  </code></pre>
  
  <blockquote>
    <p>But my attributes aren't accessible in xml. by anyOne of them</p>
  </blockquote>
  
  <p><a href="https://stackoverflow.com/a/10217752/3496570">This answer says</a> that the Problem is resolved after ADT 17.</p>
  
  <p><strong>attrs.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  
      &lt;declare-styleable name="VolumnBar"&gt;
          &lt;attr name="disableProgressRes" format="integer" /&gt;
          &lt;attr name="enableProgressRes" format="integer" /&gt;
      &lt;/declare-styleable&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p><strong>CustomView(VolumeBar) Constructor</strong></p>
  
  <pre><code>public VolumnBar(Context context, AttributeSet attributeset)
  {
      super(context, attributeset);
  
      if(!isInEditMode())
      {
          TypedArray a = context.obtainStyledAttributes(attributeset, R.styleable.VolumnBar);//VolumnBar same name as Class Name
  
          try
          {
              drawableProgress = a.getDrawable(R.styleable.VolumnBar_disableProgressRes);
  
              drawableInvalidateProgress = a.getDrawable(R.styleable.VolumnBar_enableProgressRes);
          }
          catch (Exception e)
          {
  
          }
          finally
          {
              a.recycle();
          }
      }
  }
  </code></pre>