How to keep keyboard on Xamarin.Forms?

Just to point out another solution for Android. In case you want to keep always visible the keyboard for a specific Editor Renderer, you need to override the following methods in the MainActivity class:

private bool _lieAboutCurrentFocus;
    public override bool DispatchTouchEvent(MotionEvent ev)
    {
        var focused = CurrentFocus;
        bool customEntryRendererFocused = focused != null && focused.Parent is YourCustomEditorRenderer;

        _lieAboutCurrentFocus = customEntryRendererFocused;
        var result = base.DispatchTouchEvent(ev);
        _lieAboutCurrentFocus = false;

        return result;
    }

    public override Android.Views.View CurrentFocus
    {
        get
        {
            if (_lieAboutCurrentFocus)
            {
                return null;
            }

            return base.CurrentFocus;
        }
    }

You can find a more detail explanation here

Hope this helps.

Regards

Leave a Comment