How to switch among items in AlertDialog?
<p>I'm creating an <code>AlertDialog</code> with setting array (<code>R.array.select_dialog_items</code>) of items to it:</p>

<pre><code>&lt;string-array name="select_dialog_items"&gt;
    &lt;item&gt;Start&lt;/item&gt;
    &lt;item&gt;Stop&lt;/item&gt;
    &lt;item&gt;Delete&lt;/item&gt;
&lt;/string-array&gt;
</code></pre>

<p>I don't know how to switch among these items in <code>onClick()</code> method, can you advice?</p>

<pre><code>public void init() {
        builder = new AlertDialog.Builder(mContext);
        builder.setTitle("Task");
        builder.setItems(R.array.select_dialog_items, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int item) {
                switch (item){
                case : // How to iterate here?
                }
            }
        });
        alert = builder.create();
    }
</code></pre>
