我创建了一个这样的类
public final class MyView extends View {
public MyView(Context context,AttributeSet attrs) {
super(context,attrs);
[...]
}
[...]
}
然后我想在layout.xml中使用它
android:layout_width="fill_parent"
android:layout_height="fill_parent">
android:id="@+id/my_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
但Eclipse在错误日志中告诉我
AndroidManifest: Ignoring unknown
‘com.hitziger.barcode.MyView’ XML
element
如何在布局中使MyView可访问?我是否必须在其他地方发表这门课程?