I have subclassed edit text to add a bit of proprietary behaviour called
"EditTextEx"
I am having trouble figuring how to use it
In the XML I get an error (though it compiles ok) which says my subclass is
'Invalid child element '
I realise I have to include the subclass with a reference to where the class
is declared thus
<com.murray.MonoAndroidSQLite1.EditTextEx
android:id="@+id/depdate"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:background="#90FEFB"
android:editable="false"
android:textSize="28px"
android:text="21/10/2011" />
I have tried with just the namespace of the project and that doesn't solve
it
<MonoAndroidSQLite1.EditTextEx
Do I have to put something in the header of the xml?? Declare teh project
namespace or something like that ? if so how do I declare it?
There's nothing special about the EditText subclass- just stops it looking
for the editor
public class EditTextEx : EditText
{
public EditTextEx(Context context, Android.Util.IAttributeSet attrs)
:base(context, attrs)
{
}
public override bool OnCheckIsTextEditor()
{
return false;
}
}
Many thanks in advance
John Murray
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid