How to uncheck the items while selecting one from ListView Dialog
<p>i have this code for multi pick from list in dialog, its works excellent</p>

<p>but i have some question.</p>

<p>if i press any button  -  how to uncheck all ?</p>

<pre><code> public void onListItemClick(ListView parent, View v, int position, long id)
 {
        parent.setItemChecked(position, parent.isItemChecked(position));
 }


 @Override
 protected  Dialog onCreateDialog(int id, Bundle args){
    switch(id){
    case 1:
        return new AlertDialog.Builder(this)
        .setIcon(R.drawable.ic_launcher)
        .setTitle("This is a dialog with some simple text...")
        .setPositiveButton("OK", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton)
            {
                Toast.makeText(getBaseContext(),"OK clicked!", Toast.LENGTH_SHORT).show();
            }})

        .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton)
            {
                Toast.makeText(getBaseContext(),"Cancel clicked!", Toast.LENGTH_SHORT).show();
            }
            })

        .setMultiChoiceItems(items, itemsChecked, new DialogInterface.OnMultiChoiceClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which, boolean isChecked) {
                Toast.makeText(getBaseContext(),items[which] + (isChecked ? " checked!":" unchecked!"),Toast.LENGTH_SHORT).show();
            }
            })
        .create();
        }
        return(null);
    }
</code></pre>
