Exemple #1
0
        void UpdateContent()
        {
            if (!XForms.IsInitialized)
            {
                Log.Debug(FormsCircularUI.Tag, "Tizen Forms is not initialized");
                return;
            }

            _contentView.Children.Clear();
            if (Content != null)
            {
                _contentView.Children.Add(Content);

                var renderer = Xamarin.Forms.Platform.Tizen.Platform.GetOrCreateRenderer(_contentView);
                (renderer as LayoutRenderer)?.RegisterOnLayoutUpdated();
                var sizeRequest = _contentView.Measure(XForms.NativeParent.Geometry.Width, XForms.NativeParent.Geometry.Height).Request.ToPixel();

                _nativeContent = renderer.NativeView;
                _nativeContent.MinimumHeight = sizeRequest.Height;

                _layout.SetPartContent("elm.swallow.content", _nativeContent, true);
            }
            else
            {
                _layout.SetPartContent("elm.swallow.content", null, true);
            }
        }
Exemple #2
0
        void UpdateContent()
        {
            if (Application.Current.Platform == null)
            {
                return;
            }

            _contentView.Children.Clear();
            if (Content != null)
            {
                _contentView.Children.Add(Content);
                _contentView.Platform = Application.Current.Platform;

                var renderer = Xamarin.Forms.Platform.Tizen.Platform.GetOrCreateRenderer(_contentView);
                (renderer as LayoutRenderer)?.RegisterOnLayoutUpdated();
                var sizeRequest = _contentView.Measure(TForms.NativeParent.Geometry.Width, TForms.NativeParent.Geometry.Height).Request.ToPixel();

                _nativeContent = renderer.NativeView;
                _nativeContent.MinimumHeight = sizeRequest.Height;

                _layout.SetPartContent("elm.swallow.content", _nativeContent, true);
            }
            else
            {
                _layout.SetPartContent("elm.swallow.content", null, true);
            }
        }
Exemple #3
0
        void UpdateProcessVisibility()
        {
            if (Application.Current.Platform == null)
            {
                return;
            }

            if (_isProgressRunning)
            {
                _box = new ElmSharp.Box(TForms.NativeParent);
                _box.Show();

                _progress = new ElmSharp.ProgressBar(TForms.NativeParent)
                {
                    Style = "process/popup/small",
                };
                _progress.Show();
                _progress.PlayPulse();
                _box.PackEnd(_progress);

                _layout.SetPartContent("elm.swallow.content", _box, true);

                UpdateTitle();
                UpdateText();
            }
            else
            {
                _layout.SetPartContent("elm.swallow.content", null, true);
            }
        }
Exemple #4
0
        void UpdateProcessVisibility()
        {
            if (!XForms.IsInitialized)
            {
                Log.Debug(FormsCircularUI.Tag, "Tizen Forms is not initialized");
                return;
            }

            if (_isProgressRunning)
            {
                _box = new ElmSharp.Box(XForms.NativeParent);
                _box.Show();

                _progress = new ElmSharp.ProgressBar(XForms.NativeParent)
                {
                    Style = "process/popup/small",
                };
                _progress.Show();
                _progress.PlayPulse();
                _box.PackEnd(_progress);

                _layout.SetPartContent("elm.swallow.content", _box, true);
            }
            else
            {
                if (_box != null)
                {
                    if (_progress != null)
                    {
                        _progress.Unrealize();
                        _progress = null;
                    }

                    if (_progressLabel != null)
                    {
                        _progressLabel.Unrealize();
                        _progressLabel = null;
                    }

                    _box.Unrealize();
                    _box = null;
                }
                _layout.SetPartContent("elm.swallow.content", null, true);
            }

            UpdateTitle();
            UpdateText();
        }
        void UpdateProcessVisibility()
        {
            if (Application.Current.Platform == null)
            {
                return;
            }

            if (_isProgressRunning)
            {
                _box = new ElmSharp.Box(TForms.NativeParent);
                _box.Show();

                _progress = new ElmSharp.ProgressBar(TForms.NativeParent)
                {
                    Style = "process/popup/small",
                };
                _progress.Show();
                _progress.PlayPulse();
                _box.PackEnd(_progress);

                if (!string.IsNullOrEmpty(_text))
                {
                    var progressLabel = new ElmSharp.Label(TForms.NativeParent)
                    {
                        TextStyle = "DEFAULT = 'align=center'",
                    };
                    progressLabel.Text = _text;
                    progressLabel.Show();
                    _box.PackEnd(progressLabel);
                }

                _layout.SetPartContent("elm.swallow.content", _box, true);

                UpdateTitle();
                UpdateText();
            }
            else
            {
                _layout.SetPartContent("elm.swallow.content", null, true);
            }
        }
Exemple #6
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);
        }