how to do alert dialog box activity
<p>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</p>

<p><strong>This is my code</strong></p>

<pre><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.
</code></pre>
