示例#1
0
 public static void ShowLoading(Context context)
 {
     alert = new global::Android.Support.V7.App.AlertDialog.Builder(context);
     alert.SetView(Resource.Layout.loading);
     alert.SetCancelable(false);
     alertDialog = alert.Show();
 }
示例#2
0
        private void OnEventCreated()
        {
            global::Android.Support.V7.App.AlertDialog.Builder builder = new global::Android.Support.V7.App.AlertDialog.Builder(this);
            builder.SetTitle("Aviso");
            builder.SetMessage(editMode ? "El evento ha sido editado con éxito" : "El evento ha sido creado con éxito");
            builder.SetPositiveButton("OK", OkAction);
            builder.SetCancelable(false);

            Dialog dialog = builder.Create();

            dialog.Show();
        }
示例#3
0
        private void OnFeatureModified()
        {
            global::Android.Support.V7.App.AlertDialog.Builder builder = new global::Android.Support.V7.App.AlertDialog.Builder(this);
            builder.SetTitle("Aviso");
            builder.SetMessage("No tienes guardias activas.");
            builder.SetPositiveButton("OK", OkAction);
            builder.SetCancelable(false);

            Dialog dialog = builder.Create();

            dialog.Show();
        }
        private void OnFeatureModified()
        {
            global::Android.Support.V7.App.AlertDialog.Builder builder = new global::Android.Support.V7.App.AlertDialog.Builder(this);
            builder.SetTitle("Aviso");
            builder.SetMessage("No puedes modificar una novedad de la que no eres autor.");
            builder.SetPositiveButton("OK", OkAction);
            builder.SetCancelable(false);

            Dialog dialog = builder.Create();

            dialog.Show();
        }
        private void PlaybackAcceptPopup()
        {
            View dialogLayout = LayoutInflater.Inflate(Resource.Layout.DialogButton, null);

            playBtn        = dialogLayout.FindViewById <Button>(Resource.Id.dialogBtn);
            playBtn.Text   = Resources.GetString(Resource.String.ListenBtn);
            playBtn.Click += (e, o) =>
            {
                if (player.IsPlaying)
                {
                    player.Stop();
                    player.Reset();
                    playBtn.Text = Resources.GetString(Resource.String.ListenBtn);
                }
                else
                {
                    player.SetDataSource(filePath);
                    player.Prepare();
                    player.Start();
                    playBtn.Text = Resources.GetString(Resource.String.StopBtn);
                }
            };

            global::Android.Support.V7.App.AlertDialog.Builder dialog = new global::Android.Support.V7.App.AlertDialog.Builder(this);
            dialog.SetTitle("Use this recording?");
            dialog.SetMessage("Do you want to use this recording, or try recording another clip?");
            dialog.SetView(dialogLayout);
            dialog.SetCancelable(false);
            dialog.SetNegativeButton("Record another", (s, e) =>
            {
                player.Stop();
                player.Reset();
            });
            dialog.SetPositiveButton("Use this", (s, e) =>
            {
                player.Stop();
                player.Reset();
                ReturnWithFile();
            });
            dialog.Show();
        }
        public override Dialog OnCreateDialog(global::Android.OS.Bundle savedInstanceState)
        {
            _contextWeak.TryGetTarget(out Context context);

            var alertBuilder = new global::Android.Support.V7.App.AlertDialog.Builder(context);

            alertBuilder.SetTitle(_title);

            if (_message != null)
            {
                alertBuilder.SetMessage(_message);
            }

            _textInput = new EditText(context);
            _textInput.AddTextChangedListener(this);
            alertBuilder.SetView(_textInput);

            if (_hint != null)
            {
                _textInput.Text = _hint;
                _textInput.SelectAll();
            }

            alertBuilder.SetCancelable(false);

            alertBuilder.SetNegativeButton(_cancelButton ?? "Cancel", delegate
            {
                Tcs.TrySetResult(null);
            });

            alertBuilder.SetPositiveButton(_actionButton ?? "Ok", (EventHandler <DialogClickEventArgs>)null);

            var alert = alertBuilder.Create();

            alert.SetOnShowListener(this);

            return(alert);
        }