Forum Cross Platform with Xamarin

Problem With EditText Focus in a MvxFragment using Hardware Keyboard

I have a problem trying to use the hard keyboard to type some text into a EditText.

That issue only happens when the EditText is part of a MvxFragment, when i start to writting into it, the edittext loses the focus. And i cant write anything

i have been looking in forums, and it is seem like an android bug. But i only get workarounds about native Fragments.

can somebody help me? I am a newbie using xamarin.

Sorry for my bad english!

Thank You Very Much!

Answers

  • DarshanJSDarshanJS USMember ✭✭✭✭
    edited January 2018

    try this code to get focus on text

            Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
                    {
                        //Invoke on Main thread, or this won't work
                        edittext.Focus();  // here replace with your entry name
                    });
    
Sign In or Register to comment.