Change Entry keyboard type while typing

I'm trying to change the keyboard-type of an Entry while the user is typing.
The thing is, I want it to change to numeric keyboard if the text is 3 characters or more.
Inside "OnTextChanged"
if (_entry.Text.Length >= 3)
{
_entry.Keyboard = Keyboard.Numeric;
}

This works fine on Android, but not on iOS or Win Phone.
Setting keyboard type on WinPhone and iOS only works if the keyboard type is set from start.

Could someone confirm this? Should it be like this?
Regards Andreas

Tagged:

Best Answers

Answers

  • AndrewMobileAndrewMobile USMember ✭✭✭✭

    on WinPhone, it's probably a similar thing, not sure

  • AndreasBrostenAndreasBrosten USMember ✭✭

    Well, that solved it for iOS, but I havn't been able to do the same for WinPhone =(

  • AndreasBrostenAndreasBrosten USMember ✭✭

    I Think you are correct. Seems like a limitation on WinPhone. Can't do it in a Clean WP Project either.
    Thanks for your help!

    Btw, do you know a way of showing the "Numbers and symbols" variation (123?) of the text-keyboard för Android?

  • AndrewMobileAndrewMobile USMember ✭✭✭✭

    just to be sure I understand, "Numbers and symbols" is something you don't have in Xamarin Forms right?

  • AndreasBrostenAndreasBrosten USMember ✭✭

    Exactly. Have to be done in a native renderer i Think.
    On iOS it is called "NumbersAndPunctuation"

  • AndrewMobileAndrewMobile USMember ✭✭✭✭
    edited June 2015

    if you must do this on WinPhone it would be harder (due to how Entry is implemented on WinPhone)
    for iOS and Android not sure, but I think it's easier

  • ChrisColeTechChrisColeTech USMember ✭✭✭

    Is this fixed in the latest version?

Sign In or Register to comment.