@Override
 public void onClick(DialogInterface dialog, int which, boolean isChecked) {
   if (isChecked) {
     listener.onSelect(which);
   } else {
     listener.onUnselect(which);
   }
 }
 @Override
 public void onClick(DialogInterface dialog, int which) {
   listener.onCancel(dialog);
 }