I have a custom PieTimer View in an Android Library Project
package com.mysite.android.library.pietimer;
public class PieTimerView extends View {
...
After two hours of work with my coworker, we figure out how to make this work :
Library : com.library
mywidget.java with a class MyWidget
attrs.xml :
and put your attr.
Instead of having your layout (main.xml for example) with your widget declared in it, just create a my_widget.xml in the layout folder of your library.
my_widget.xml :
for including it in your layout, just put
App : com.myapp
You just have to duplicate my_widget.xml here, and change the namespace :
And normally it will work !