I have an application that I now want to split part of off into a library project so I can re-use it in several other places. Among the stuff in there being re-used is a custom view, which uses code from this answer (http://stackoverflow.com/questions/1258275/vertical-rotated-label-in-android) with some adaptations I made to it. Anyway, the styleable resources don't work properly. The attr.xml looks like this:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="VerticalTextView">
<attr name="text" format="string" />
<attr name="textColor" format="color" />
<attr name="textSize" format="dimension" />
<attr name="rotateLeft" format="boolean" />
</declare-styleable>
</resources>
and it's referenced in a layout file in the library project. I get the following error in Eclipse when trying to compile the main project:
[2010-12-20 23:29:38 - MyApp] C:\Library\res\layout\main.xml:124: error: No resource identifier found for attribute 'text' in package 'com.mydomain.mylibrary'
I'm puzzled. I've tried everything I can think of to get this to work, and I just haven't found the magic combination. How do I make styleable resources work inside of a library project?