Ejemplo n.º 1
1
 void showAlert(AlertDialog.Builder builder)
 {
     alert = builder.Create();
     alert.Show();
     var acceptButton = alert.GetButton((int)DialogButtonType.Positive);
     acceptButton.Click += saveNewDrink;
     var cancelButton = alert.GetButton((int)DialogButtonType.Negative);
     cancelButton.Click += (sender, e) => { alert.Dismiss(); };
 }
Ejemplo n.º 2
0
 private void ShowDialogInUiThread(AlertDialog.Builder builder)
 {
     CloseDialog();
     Mvx.Resolve<IMvxMainThreadDispatcher>().RequestMainThreadAction(() =>
     {
         _currentDialog = builder.Create();
         _currentDialog.Show();
     });
 }
Ejemplo n.º 3
0
		public MyListDialog(Context context, AlertDialog.Builder builder,
			EventHandler<DialogClickEventArgs> listener) {

			mItemMap = new Dictionary<string, string>();
			mAdapter = new ArrayAdapter<string>(context, Android.Resource.Layout.SelectDialogSingleChoice);

			// Create dialog from builder
			builder.SetAdapter(mAdapter, listener);
			mDialog = builder.Create();
		}
		private AlertDialog CustomizeAndCreate(AlertDialog.Builder dialogBuilder)
		{
			IAlertDialogBuilderCustomizer customizer;
			if (Mvx.TryResolve(out customizer))
				customizer.Customize(dialogBuilder);

			return dialogBuilder.Create();
		}
        private void CustomizeAndShow(AlertDialog.Builder dialogBuilder)
        {
            IAlertDialogBuilderCustomizer customizer;
            AlertDialog dialog;
            if (Mvx.TryResolve(out customizer))
            {
                dialog = customizer.CustomizeAndCreate(dialogBuilder, this.CurrentActivity);
            }
            else
            {
                dialog = dialogBuilder.Create();
            }

            dialog.Show();
        }
Ejemplo n.º 6
0
 private void ShowAndWait(AlertDialog.Builder builder, bool softInput = false)
 {
     var dialog = builder.Create();
         dialog.DismissEvent += delegate { breakLoop.SendMessage(breakLoop.ObtainMessage()); };
         if (softInput)
         {
             var window = dialog.Window;
             window.SetSoftInputMode(SoftInput.StateVisible);
         }
         dialog.Show();
         Loop();
 }
Ejemplo n.º 7
0
        protected AlertDialog BuildFinishedDialog(AlertDialog.Builder builder)
        {
            var dia = builder.Create();

            dia.SetCancelable(false);
            dia.SetCanceledOnTouchOutside(false);

            return dia;
        }