I created a class like this
public final class MyView extends View { public MyView(Context context, AttributeSet attrs) { super(context, attrs); [...] } [...] }
and then I want to use it in my layout.xml
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.hitziger.barcode.MyView android:id="@+id/my_view" android:layout_width="fill_parent" android:layout_height="fill_parent"/> </FrameLayout>
But Eclipse tells me in the error log
AndroidManifest: ignoring unknown 'com.hitziger.barcode.MyView' XML Element
How to make MyView available in layout? Should I publish this class elsewhere?
hitzi
source share