title: How to programmatically set custom attributes of custom components?
body: <p>I have a custom component called <code>CircleView</code>, and I want to change a custom attribute called <code>fillColor</code> defined in <code>attrs.xml</code>:</p>
  
  <pre><code>&lt;declare-styleable name="CircleView"&gt;
      &lt;attr name="radius" format="integer" /&gt;
      &lt;attr name="fillColor" format="color" /&gt;
  &lt;/declare-styleable&gt;
  </code></pre>
  
  <p>I have set it initially in my layout XML, which currently looks like this (namespace <code>circleview</code> is defined as <code>xmlns:circleview="http://schemas.android.com/apk/res-auto"</code>; it works fine when I define it in the XML, so this shouldn't be an issue):</p>
  
  <pre><code>&lt;com.mz496.toolkit.CircleView
       ...
       circleview:fillColor="#33ffffff"/&gt;
  </code></pre>
  
  <p>I can get the <code>fillColor</code> attribute just fine in my <code>CircleView</code>, which extends <code>View</code>, but I don't know how to set its value.</p>
  
  <p>I've investigated things like <code>setBackgroundColor</code> and looked for other "set" methods, but I couldn't find any. I imagined a method like</p>
  
  <p><code>circle.setAttribute(R.styleable.CircleView_fillColor, "#33ff0000")</code></p>