What about all the Android APIs referencing resources such as setIcon
(R.drawable.myIcon)... how would those be handled?  Those are the ones
I am having problems with not any of my APIs.  I'm getting a feeling
the resource architecture of Android doesn't lend itself to library
sharing.

On Feb 25, 2:14 pm, Mark Murphy <[email protected]> wrote:
> Ron wrote:
> > Thanks Mark.  Can I have a bit more information as I am still
> > unclear?  Do you have a 'before' and 'after' example?  Thanks.
>
> Ummmm...
>
> Before:
>
> void doSomething() {
>         InputStream is=getResoures().openRawResource(R.raw.something);
>
>         // do something with stream here
>
> }
>
> After:
>
> void doSomething(int rawResourceId) {
>         InputStream is=getResoures().openRawResource(rawResourceId);
>
>         // do something with stream here
>
> }
>
> In this example, doSomething() is implemented in the base JAR. The
> resources are not defined in the base JAR, but rather in the APK that is
> using the base JAR. Hence, the base JAR not only does not have R.java,
> but it cannot even rely upon resources having certain numerical values.
> Instead, the APK has the resources and passes in the resource ID:
>
> doSomething(R.raw.this_is_something_in_the_apk);
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to