문제

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?

도움이 되었습니까?

해결책

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
    }

}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top