Alert Dialog with more than two buttons in Adroid(Android UI)

 

In this blog I will tell u how u can create alert dialog  with more than two
buttons.


1. make a button in android and in onclick event make a call to BtnClick methord.

2.now in java class inside click methord write code like below.



3.title is made by  builder.setTitle("Alert Btn"); 
 you can change title


4.add detail of button by  builder.setMessage("choose any btn ");


5.you can  add positive, negative and neutral button by 

builder.setPositiveButton("Terms", new DialogInterface.OnClickListener()

builder.setNegativeButton("Privacy policy", new DialogInterface.OnClickListener() 

builder.setNeutralButton("Cancel", new DialogInterface.OnClickListener() 



6.hope this blog helpful for you.



                     Download Full Project- CLICK HERE 






 

Post a Comment

0 Comments