I'm developing an API for Android and it works great but I'm not sure how to package/distribute it. I've gotten the "meat" of the API into a jarfile - that's all the classes and an XML file in res/values/attrs.xml
(I'm not sure if there's a way users can reference to that without having to copy my attrs.xml into their /values folder, but that's another question).
While trying my API in a test case, I've added my .jar to the build path and I can import a class successfully if I want to, but I don't want to :P My API allows users to implement a custom View into their own XML files, so nothing is instantiated in code.
The question: How can users reference to a custom View in my API? For example, if my View is called FooView
and is in package com.myfoo
, the following XML fails to load:
<com.myfoo.FooView
android:layout_width="fill_parent"
android:layout_height="100dp"
/>