nex3z/NotificationBadge

"animationDuration" styleable conflict

volvciklum opened this issue · 3 comments

"animationDuration" styleable may conflict with another one from different library. And it does in my case. Propose to rename all styleables to include some unique prefix for ex. "nb":
nbTextSize
nbTextColor
nbBackground
nbAnimationDuration
etc.

nex3z commented

Hi, volvciklum. Did you have the conflict with material-intro-screen?
I tried NotificationBadge with material-intro-screen and it complies (with buildToolsVersion “25.0.2”). I've found a

<attr name="animationDuration" format="integer" />

in material-intro-screen, which has the same format as in NotificationBadge.

As per this issue mentioned, it seems that build tools "24.0.1" fix this issue partially. When using libraries which contain attributes with the same name, if the attributes are in the same format, no compile error should occur. If the attributes are in different formats, there will be a "Attribute xxx already defined with incompatible format" error.

Anyway I've prefixed the attribute in NotificationBadge to prevent any future conflict. Please find the new README and try

compile 'com.nex3z:notification-badge:0.2.0'

Thanks for the feedback.

Thanks a lot.

And yes, it was material-intro-screen.