> Reusable classes cannot use the R.* notation to reference resources.
>
> You can either:
>
> -- Accept resource IDs as parameters, the way much of the Android SDK is
> set up. That way, the calling application controls the name of the
> resource. You just get an opaque integer identifying the resource, which
>  you pass to appropriate SDK methods.

Hmmm.  Don't see any way to make this work with e.g. layout.xml files.


> -- Use getResources().getIdentifier() to look up a resource by name.
> This means your application defines the name (reducing caller
> flexibility), and this lookup is not quick.

I was thinking along the lines of styleables.  E.g. if I want to
define gridbox:layout_gridx which is an integer.  Let me look into
using getIdentifier; this might do the trick.  Thanks.

-- 
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