I've been trying to make an android library project, and while the build process works fine, I've been running into some trouble with replacing a resource in the project which uses the library.
In my library I have:
A
library_layout.xml
containing<TextView android:id="@+id/str_my_string" android:layout_width="wrap_content" android:layout_text="wrap_content">
A java file which calls
((TextView)this.findViewById(R.id.str_my_string)).setText(R.string.my_string);
A resource
strings.xml
containing<string name="my_string">Placeholder</string>
In the project using the library I have
A resource
strings.xml
containing<string name="my_string">Actual string content</string>
The behavior I expect is that when I run the project using the library, the text view displays Actual string content, but it actually contains false.
Looking in the app which uses the library, I do see two R
files, and both of them have R.string.my_string
and both of those are equal to the same numeric value.