void ShowPopup()
        {
            if (_editorPopup == null)
            {
                CreatePopup();
            }
            if (_editor.IsPassword != Control.IsPassword)
            {
                _editor.IsPassword = Control.IsPassword;
            }

            _editor.Text = Control.Text;

            var edjeObj = Control.EdjeObject;

            edjeObj.GetColorClass("layout/editfield/bg",
                                  out int r, out int g, out int b, out int a,
                                  out _, out _, out _, out _,
                                  out _, out _, out _, out _);

            _defaultColor = new ElmSharp.Color(r, g, b, a);

            _editor.TextColor  = Control.TextColor;
            _editorPopup.Color = Control.BackgroundColor == default(ElmSharp.Color) ? _defaultColor : Control.BackgroundColor;

            _editor.MoveCursorEnd();
            _editor.ShowInputPanel();
        }
Esempio n. 2
0
        void ShowPopup()
        {
            if (_editorPopup == null)
            {
                CreatePopup();
            }
            _editor.IsPassword = Control.IsPassword;
            _editor.HorizontalTextAlignment = Control.HorizontalTextAlignment;

            _editor.Text         = Control.Text;
            _editor.TextChanged += PopupEntryTextChanged;
            _editor.Activated   += PopupEntryActivated;

            DefaultColor       = new ElmSharp.Color(40, 40, 40, 255); //editfield bg default color
            _editor.TextStyle  = Control.TextStyle;
            _editorPopup.Color = Control.BackgroundColor == default(ElmSharp.Color) ? DefaultColor : Control.BackgroundColor;

            _editor.MoveCursorEnd();
            _editor.ShowInputPanel();
        }
Esempio n. 3
0
        void ShowPopup()
        {
            if (_editorPopup == null)
            {
                CreatePopup();
            }
            if (_editor.IsPassword != Control.IsPassword)
            {
                _editor.IsPassword = Control.IsPassword;
            }

            _editor.Text = Control.Text;

            DefaultColor       = new ElmSharp.Color(40, 40, 40, 255); //editfield bg default color
            _editor.TextColor  = Control.TextColor;
            _editorPopup.Color = Control.BackgroundColor == default(ElmSharp.Color) ? DefaultColor : Control.BackgroundColor;

            _editor.MoveCursorEnd();
            _editor.ShowInputPanel();
        }
Esempio n. 4
0
        void CreatePopup()
        {
            var rect = Xamarin.Forms.Platform.Tizen.Forms.NativeParent.Geometry;

            _editorPopup = new ElmSharp.Background(Xamarin.Forms.Platform.Tizen.Forms.NativeParent)
            {
                Geometry = rect
            };

            var layout = new ElmSharp.Layout(_editorPopup);

            layout.SetTheme("layout", "entry", "default");
            layout.Show();

            _editorPopup.SetPartContent("overlay", layout);
            _editorPopup.Color = Control.BackgroundColor;

            _editor = new Xamarin.Forms.Platform.Tizen.Native.Entry(layout);
            _editor.IsSingleLine      = true;
            _editor.Scrollable        = true;
            _editor.PredictionAllowed = false;
            _editor.SetInputPanelEnabled(false);
            _editor.ShowInputPanel();
            _editor.AllowFocus(true);
            _editor.Show();

            _editor.SetInputPanelReturnKeyType(ElmSharp.InputPanelReturnKeyType.Done);

            _editor.SetInputPanelLayout(ElmSharp.InputPanelLayout.Normal);

            _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);
        }
Esempio n. 5
0
        void ShowPopup()
        {
            if (_editorPopup == null)
            {
                CreatePopup();
            }
            _editor.IsPassword = Control.IsPassword;
            _editor.HorizontalTextAlignment = Control.HorizontalTextAlignment;

            _editor.Text         = Control.Text;
            _editor.TextChanged += PopupEntryTextChanged;
            _editor.Activated   += PopupEntryActivated;

            _editor.TextStyle  = Control.TextStyle;
            _editorPopup.Color = _popupBackgroundColor;

            _editor.MoveCursorEnd();
            _editor.ShowInputPanel();

            Control.TextChanged += OnTextChanged;
        }