You need to implement the correct ctors.
When you implement the View
class then you have to at least have the ctor with the following signature:
public PositionDrawer(IntPtr javaReference, JniHandleOwnership transfer)
: base(javaReference, transfer) { }
And if you are using the View
in a AXML
layout you also need the one with the following signature:
public PositionDrawer(Context context, IAttributeSet attrs, int defStyle)
: base(context, attrs, defStyle)
Otherwise when you create View
s from code, you need to give them some LayoutParameters
otherwise they do not know their own size.