private void ShowSessionExpiredError() { global::Android.Support.V7.App.AlertDialog.Builder alert = new global::Android.Support.V7.App.AlertDialog.Builder(this); alert.SetTitle("Aviso"); alert.SetMessage("Su sesión ha expirado, por favor ingrese sus credenciales nuevamente"); Dialog dialog = alert.Create(); dialog.Show(); }
private void ShowErrorAlert(string message) { global::Android.Support.V7.App.AlertDialog.Builder alert = new global::Android.Support.V7.App.AlertDialog.Builder(this); alert.SetTitle("Error"); alert.SetMessage(message); Dialog dialog = alert.Create(); dialog.Show(); }
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(); }
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 ShowErrorAlert(string message) { if (string.IsNullOrEmpty(message)) { return; } global::Android.Support.V7.App.AlertDialog.Builder alert = new global::Android.Support.V7.App.AlertDialog.Builder(Activity); alert.SetTitle("Error"); alert.SetMessage(message); Dialog dialog = alert.Create(); 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); }