Home > Mobile >  AlertDialog how to disappear
AlertDialog how to disappear

Time:11-25

I customize a view, then call setView approach to set up, in the view of two button set to monitor, click and then make it disappear, but always don't know how to write, is also unable to invoke the dialog. The dismiss (); At the same time, also set up a navihationbutton can disappear

CodePudding user response:

 
AlertDialog. Builder Builder=new AlertDialog. Builder (context);
The View viewDialog=the inflate (context, R.l ayout. Dialog_plans_details, null);
Builder. SetView (viewDialog);
Final AlertDialog AlertDialog=builder. The create ();
AlertDialog. The create ();
AlertDialog. The show ();

So you can when you want to call dismiss with alertDialog. Dismiss will be OK
  • Related