public static void UpdateKeyboard(this Native.Entry control, Keyboard keyboard, bool isSpellCheckEnabled) { control.Keyboard = keyboard.ToNative(); if (keyboard is CustomKeyboard customKeyboard) { control.AutoCapital = customKeyboard.Flags.ToAutoCapital(); } else { control.AutoCapital = AutoCapital.None; } control.InputHint = keyboard.ToInputHints(isSpellCheckEnabled); }
void CreatePopup() { var rect = XForms.NativeParent.Geometry; var root = FindWindow(XForms.NativeParent); _editorPopup = new Background(root) { Geometry = rect }; var layout = new ELayout(_editorPopup); layout.SetTheme("layout", "entry", "default"); layout.Show(); _editorPopup.SetPartContent("overlay", layout); _editor = new Xamarin.Forms.Platform.Tizen.Native.Entry(layout); _editor.IsSingleLine = true; _editor.Scrollable = true; _editor.SetInputPanelEnabled(false); _editor.AllowFocus(true); _editor.PrependMarkUpFilter(PopupEntryMaxLengthFilter); _editor.Show(); _editor.SetInputPanelReturnKeyType(Element.ReturnType.ToInputPanelReturnKeyType()); _editor.UpdateKeyboard(Element.Keyboard, Element.IsSpellCheckEnabled, Element.IsTextPredictionEnabled); _editorPopup.BackButtonPressed += (s, e) => HidePopup(); _editor.Activated += (s, e) => HidePopup(); IntPtr entryHandle = Interop.EFL.elm_entry_imf_context_get(_editor.RealHandle); _editorStateChanged = EditorStateChanged; Interop.EFL.ecore_imf_context_input_panel_event_callback_add(entryHandle, Interop.EFL.InputPanelEventType.State, _editorStateChanged, IntPtr.Zero); layout.SetPartContent("elm.swallow.content", _editor); }