On Tue, Jun 15, 2010 at 6:24 PM, Mark Wyszomierski <[email protected]> wrote: > I've made an activity which uses some image resources. I'd like to > make it available to other projects by packaging it as a jar. The > project is opensource - the goal of making it a jar would just be > convenience for the end developer. > > I'm not sure that this is possible though - since the jar is being > created at the top level of my project's directory structure, it will > include all resources like string.xml, icon.png, etc. The projects > that import my jar will likely have resources with the same names, > which will probably be a problem since android resources aren't > namespaced, if I understand correctly. > > Is there a way to export custom-made activities/views which need to > internally reference their own set of resources?
I set up some tech for this as part of the Android Parcel Project: http://andparcel.com/ In particular, these instructions for creating a parcel may be of interest: http://andparcel.com/pdfs/parcel-dev.pdf Also, the current version of _The Busy Coder's Guide to Advanced Android Development_ has a chapter on creating reusable components like these. Since you're a subscriber, you should have access to this version of the book. -- Mark Murphy CommonsWare [email protected] http://commonsware.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

