Multiple EditText objects in AlertDialog

后端 未结 3 1619
暗喜
暗喜 2020-12-08 04:18

I\'m working on a project for college that will let a user place a point on a map and then set the title and description for the overlay object. The problem is, the second <

3条回答
  •  长情又很酷
    2020-12-08 05:10

    Code for create a popup with two EditText using Xamarin

        public void dial()
        {
    
            AlertDialog alerta = new AlertDialog.Builder(this).Create();
            LinearLayout layout = new LinearLayout(this);
    
                       layout.Orientation = Orientation.Vertical;
    
    
            EditText factinput = new EditText(this);
            alerta.SetMessage("Facturas Disponibles:");
            layout.AddView(factinput);
    
            EditText canttinput = new EditText(this);
            alerta.SetMessage("Cantidad:");
            layout.AddView(canttinput);
    
            alerta.SetView(layout);
    
    
            alerta.SetButton("Cancelar", (a, b) =>
            {
    
                AlertDialog cencelacion = new AlertDialog.Builder(this).Create();
                cencelacion.SetMessage("Desea Cancelar");
                cencelacion.SetButton("OK", (c, d) => { });
                cencelacion.Show();
    
            });
            alerta.SetButton2("Aceptar", (ee, f) =>
            {
                AlertDialog confirmacion = new AlertDialog.Builder(this).Create();
                confirmacion.SetMessage("Realizar Busqueda de Factura");
                confirmacion.SetButton("OK", (c, d) => { });
                confirmacion.Show();
            }
            );
    
            alerta.Show();
    
        }
    

提交回复
热议问题