From what I read elsewhere , the "Unknown Resource Identifier" compiler error for user attributes disappears when the namespace for the included project is changed to: xmlns: si = "http://schemas.android.com/apk/ lib / com .my.base.project "instead of" xmlns: si = "http://schemas.android.com/apk/ res /com.my.base.project"
This still does not solve the problem of actually reading the value of the custom attribute. Out of context without a project. The control gets the default value. Any ideas to make this work?
In my application, I use this custom attribute like this in the layout XML file:
<merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:si="http://schemas.android.com/apk/lib/com.my.base.project"> <com.my.base.project.view.CustomView si:collapsedHeight="100dp"> </com.my.base.project.view.CustomView> </merge>
source share