Question

I need to implement a RegExpInputFilter as an IInputFilter in Mono for Android but I do not understand how to do it. Is there some guidance on how to implement Java interfaces somewhere that explains this in detail? Or even better, has anyone written their own IInputFilter in Mono for Android that can share the code or just some tips?

Was it helpful?

Solution

IInputFilter is already part of the Mono for Android framework

It is part of the Android.Text namespace

http://androidapi.xamarin.com/?link=T:Android.Text.IInputFilter

class RegExInputFilter : Java.Lang.Object, IInputFilter
{
    public Java.Lang.ICharSequence FilterFormatted(Java.Lang.ICharSequence source, int start, int end, ISpanned dest, int dstart, int dend)
    {
       //filter
    }

}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top