If I import:
CustomViewA (imported from Maven)
<declare-styleable name="CustomViewA">
<attr name="min" format="float"/>
<attr name="max" format="float"/>
</declare-styleable>
CustomViewB (imported from Maven)
<declare-styleable name="CustomViewB">
<attr name="min" format="float"/>
<attr name="max" format="float"/>
</declare-styleable>
This will fail saying that min and max are duplicated. I thought Android would distinguish by the declare-styleable name
, but guess not. Saying that, what's the best way to name a custom View attr
to avoid any possible duplicate value clash in the future?
The only solution I got so far is:
<attr name="minForMyCustomViewHopingNoOneUsesThisName" format="float"/>
Which sucks.