How can I distribute custom components which have custom attributes to
other projects?  Is it possible to define my custom attributes in code
(versus xml) which would make it easier to compile the entire
component into a JAR without the need for the host project to define
attributes in XML?  What am I missing?

For example I have a custom component and I want to package it as a
JAR for easy use in projects.  My custom component relies on a custom
attribute that I've defined in res/values/attrs.xml like so:
     <declare-styleable name="MyComponent">
        <attr name="startIndex" format="integer" />
    </declare-styleable>

Where I get lost is...Does every project that uses my component need
to add/modify it's attrs.xml to have the "startIndex" definition?

I've been attempting various approaches.  It seems like ultimately
attributes belong to the package namespace - which would cause obvious
problems for the way I'm trying to distribute my component.  Will I
really have to tell all my users to edit their attrs.xml?

Any help is appreciated.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to