PhoneNumberFormattingTextWatcher

talenonetalenone Danish SamiSAMember

Is there any way to use android.telephony.PhoneNumberFormattingTextWatcher using Mono for Android?

I am trying to perform phone number formatting:

private EditText _dV;
_dV.AddTextChangedListener(/*android.telephony.PhoneNumberFormattingTextWatcher*/);

Posts

  • JonathanPryorJonathanPryor Jonathan Pryor USXamarin Team Xamurai

    The android.telephony.PhoneNumberFormattingTextWatcher type was removed for unknown reasons (presumably because our binding generator didn't like it at that time). I'll add it back for a future release.

    In the meantime, you'll need to do things manually:

    using (var watcher = Java.Lang.Object.GetObject<Android.Text.ITextWatcher>(
                JNIEnv.CreateInstance ("android/telephony/PhoneNumberFormattingTextWatcher", "()V"),
                JniHandleOwnership.TransferLocalRef))
        _dV.AddTextChangedListener (watcher);
    
  • tadrianotadriano Thiago Adriano USMember

    Hi, How can I change locale to pt br?

Sign In or Register to comment.