Hello all, I'm introducing multiple custom widgets for my application, extending View. These widgets (LineGraph and DotMatrix) include various attributes that can be set via the layout-xml. How can I have multiple widgets using attributes with the same name. For instance, 2 attributes both having color as an attribute that can be set via the layout XML?
main.xml snippet: XML: xmlns:app="http://schemas.android.com/apk/res/ net.vlemmix.android.widgetdemos" <net.vlemmix.android.widget.DotMatrix android:id="@+id/dotmatrix1" android:layout_width="wrap_content" android:layout_height="wrap_content" app:color="0xFFF" /> attrs.xml snippet: XML: <?xml version="1.0" encoding="UTF-8"?> <resources> <declare-styleable name="DotMatrix"> <attr name="color" format="integer" /> </declare-styleable> </resources> When I want to add the info for my LineGraph in attrs.xml, Eclipse starts to whine: "ERROR Attribute "color" has already been defined" XML: <?xml version="1.0" encoding="UTF-8"?> <resources> <declare-styleable name="DotMatrix"> <attr name="color" format="integer" /> </declare-styleable> <declare-styleable name="LineGraph"> <attr name="color" format="integer" /> </declare-styleable> </resources> Is it not possible to have a DotMatix resource with a color attribute, and a LineGraph resource with a color attribute? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---