I am playing around with custom views and would like to include them in an external library (jar) for the sake of re-usability. I am trying to create some custom attributes for these views that can be set declaratively in the xml.
I have taken a look at the closely related tutorial on PocketBook (http://blog.pocketjourney.com/2008/05/0 ... urce-files - forum won't let me use URL tag on first post?), but from what I can tell it only applies to custom views that exist within an Android project.
Since I am trying to develop these views in an external library, the tutorial hasn't directly related to my situation. Therefore, when I am using one of these imported custom views in an Android project, I can't get the ADT to recognize the custom attributes.
For example, if I put the following in my main.xml:
... I get an error stating "No resource identifier found for attribute 'keypadBackgroundDrawable' in package 'martin.android.widget"
To be honest, I am completely clueless as to where android looks to locate the custom attributes. I have tried including an R.java inside of the martin.android.widget package, but either it was formatted incorrectly, or this is the wrong place. Here are the contents of the R.java file:
I was assuming that since R.java generally contains resource identifiers, that this is where android would be looking. I have a suspicion I'm on the wrong track altogether though - any pointers would be much appreciated!