I have created a new class that inherits from TwoLineListItem
, following the Compound control/component pattern: http://developer.android.com/guide/topics/ui/custom-components.html#compound
public class CheckedTwoLineListItem : TwoLineListItem, ICheckable
I have also defined a CheckedSimpleListItem2.axml layout that uses this, e.g.:
<MyNamespace.CheckedTwoLineListItem xmlsn:android="..">
<CheckedTextView android:id="@android:id/text1" />
<TextView android:id="@android:id/text2" />
</MyNamespace.CheckedTwoLineListItem>
When I attempt to inflate this inside my ListAdapter GetView()
method:
var view = Context.LayoutInflater.Inflate(Resource.Layout.CheckedSimpleListItem2, null);
The layout inflater throws a 'Class not found' - CheckedTwoLineListItem.
The XML inflation is picking up my CheckedTwoLineListItem, but the Java inflater code can't find/see my CheckedTwoLineListItem.cs class for some reason.
What am I doing wrong?