title: How to declare several stylable attributes with the same name for different tags?
body: <p>I want both my ViewA and ViewB to have the "title" tag. But I can't put this in <code>attrs.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;declare-styleable name="ViewA"&gt;
          &lt;attr name="title" format="string" /&gt;
      &lt;/declare-styleable&gt;
      &lt;declare-styleable name="ViewB"&gt;
          &lt;attr name="title" format="string" /&gt;
          &lt;attr name="max" format="integer" /&gt;
      &lt;/declare-styleable&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>because of the error <em>Attribute "title" has already been defined</em>. <a href="https://stackoverflow.com/questions/4434327/same-named-attributes-in-attrs-xml-for-custom-view/4464966#4464966">Another question</a> shows this solution:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;attr name="title" format="string" /&gt;
      &lt;declare-styleable name="ViewB"&gt;
          &lt;attr name="max" format="integer" /&gt;
      &lt;/declare-styleable&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>but in that case, <code>R.styleable.ViewA_title</code> and <code>R.styleable.ViewB_title</code> are not generated. I need them for reading the attributes from the AttributeSet using the following code:</p>
  
  <pre><code>TypedArray a=getContext().obtainStyledAttributes( as, R.styleable.ViewA);
  String title = a.getString(R.styleable.ViewA_title);
  </code></pre>
  
  <p>How can I solve this?</p>