Shachar Shemesh wrote:
> I have created a custom View class. I would now like to be able to
> create instances for it from other applications, so that they will use
> it as if it's one of the built in classes. In other words, I want to
> create the dalvik equivalent of a shared object. I want other
> applications to be able to write "import my.domain.and.class.name;". If
> I can even make them write it in the Layout resource file, even better.
> 
> What is the best way to go about doing it?

Step #1: Set up a separate project for your reusable component, perhaps
with a sample or demo application.

Step #2: Create an API for your reusable component that accepts all
resources as parameters, since resources are tied to the APK.

Step #3: Create an Ant task, Eclipse...ummm...thingamajig, or shell
script/batch file to create a JAR file with just your compiled classes.

Step #4: Distribute the JAR file, or upload the whole thing to github.

You can take a look at some of my CWAC components for examples of this
process:

https://github.com/commonsguy

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_Beginning Android_ from Apress Now Available!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to