Android: Alert Dialog
<pre><code>@Override
protected Dialog onCreateDialog (int id) {

        AlertDialog.Builder builder = new AlertDialog.Builder(this);    
        builder.setTitle(R.string.instant_alert_screen_title);
        builder.setInverseBackgroundForced(true);
        ListView aa = new ListView(this);       
        aa.setAdapter( new IconicAdapter());
        aa.setOnItemClickListener(new OnItemClickListener() {

            public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2, long arg3) {

                switch (arg2) {
                case 0:
                ......   
                break;
                case 1:
                ......
                break;
                case 2:
                ......
                break;

        builder.setView(aa);
        builder.setPositiveButton("Done", new OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                dialog.cancel();    
            }
        });
        builder.setNegativeButton("Cancel", new OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
            dialog.cancel();    

            }
        });
    return builder.create();
</code></pre>

<p>Ok guys..I have a <code>AlertDialog</code>..In <code>Adapter</code> i set to dialog 3 <code>CheckedTextView</code>...
How in on Positive Button Listener i could find a second item and check is it checked or not ? </p>

<p>Dont recomend me to do like this:</p>

<pre><code>   CheckedTextView a = (CheckedTextView)findViewById(R.id.text)
   boolean b = a.isChecked();
</code></pre>

<p>I need to use <code>onClick(DialogInterface dialog, int which)</code>  this dialog Interface...is that real ?</p>
