I have one button when I click the button it shows the alert dialog box with three options. i am click the first option do something like second and third option. how to do in android. i am very new android can you anyone please help me for this
This is my code
final CharSequence[] items = {"set", "option"};
AlertDialog.Builder builder = new AlertDialog.Builder(ProgramInfoActivity.this);
builder.setTitle("Share the Program");
builder.setItems(items, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
if( set){
}
else if (option){
}
}});
AlertDialog alert = builder.create();
alert.show();
Thanks
raj.
Here is my code…you can use it with small changes…just add another button and that it. My button Yes open another screen….