在DialogBox数组中获取值

在数组中获取选中项目的值,代码:

 final String items[] = {"Blue","Green","Orange"};
final AlertDialog.Builder alert = new AlertDialog.Builder(this);  
alert.setTitle("Money Maker");
alert.setIcon(R.drawable.ic_launcher);
alert.setMultiChoiceItems(items, checkedItems,  new 
DialogInterface.OnClickListener() {
    @Override
    public void onClick(final DialogInterface dialog, final int which) {
        String value = items.toString();
        Toast.makeText(getApplication(), value, Toast.LENGTH_LONG).show();
    }
});
alert.show();

怎么获取值并且在toast中显示?谢谢。

应该是:

alert.setMultiChoiceItems(items, checkedItems,  new 
OnMultiChoiceClickListener() {
    @Override
    public void onClick(DialogInterface dialog,
                                   int which, boolean isChecked) {
        Toast.makeText(getApplication(), items[which], Toast.LENGTH_LONG).show();
    }
});
  //store all selected items in arraylist
 ArrayList<String> selectedItems=new ArrayList<String>();
 final CharSequence[] items = { "Gujrat", "Rajasthan",
                    "Maharastra", "Panjab", "Madhya Pradesh", "Hariyana",
                    "Bihar" };
            AlertDialog.Builder builder = new AlertDialog.Builder(context);
            builder.setTitle("Select State");

            builder.setMultiChoiceItems(items, null,
                    new DialogInterface.OnMultiChoiceClickListener() {

                        @Override
                        public void onClick(DialogInterface dialog,
                                int which, boolean isChecked) {
                            // TODO Auto-generated method stub
                            if (isChecked){
                                Toast.makeText(getApplicationContext(),
                                        items[which], Toast.LENGTH_SHORT)
                                        .show();
                              selectedItems.add(items[which]);
                           }else{
                                   if(selectedItems.contains(items[which])
                                          selectedItems.remove(items[which]);
                           }
                        }
                    });
            AlertDialog alert = builder.create();
            alert.show();
        }