I have an application that I now want to share part of the project into a library project so that I can reuse it in several other places. Among the materials that use reuse is a custom view that uses the code from this answer (http://stackoverflow.com/questions/1258275/vertical-rotated-label-in-android) with some changes I made for him, Anyway, removable resources are not working properly. Attr.xml is as follows:
<?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 is mentioned in the 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: the resource identifier was not found for the 'text' attribute in the com.mydomain package. Mylibrary
I am puzzled. I tried everything I could think of to make it work, and I just didn't find the magic combination. How to make a resource working in style work inside a library project?
source
share