Пример #1
0
        public IDisposable ShowAlert(EditableInteractiveAlertConfig alertConfig)
        {
            var alertView = CreateAlertView(alertConfig);

            if (alertConfig.SingleLine)
            {
                var textField = alertView.AddTextField(alertConfig.Placeholder);
                textField.Text            = alertConfig.Text;
                textField.EditingChanged += (s, e) =>
                {
                    alertConfig.Text = textField.Text;
                };
            }
            else
            {
                var textView = alertView.AddTextView();
                textView.Text     = alertConfig.Text;
                textView.Changed += (s, e) =>
                {
                    alertConfig.Text = textView.Text;
                };
            }

            return(new DisposableAction(alertView.HideView));
        }
Пример #2
0
        public IDisposable ShowAlert(EditableInteractiveAlertConfig alertConfig)
        {
            var activity    = this.TopActivityFunc();
            var dialogAlert = EditableInteractiveDialogFragment.NewInstance <EditableInteractiveDialogFragment>(alertConfig);

            dialogAlert.Show(activity.SupportFragmentManager, DefaultDialogTag);
            return(new DisposableAction(dialogAlert.Dismiss));
        }