title: Android: int which in DialogInterface.OnClickListener() is -1
body: <p>I don't understand why this is happening. I have the following code:</p>
  
  <pre><code>AlertDialog.Builder builder = new AlertDialog.Builder(SettingsActivityNew.this);
  
  builder.setTitle("Title");
  builder.setSingleChoiceItems(R.array.example_arrays, 1, null);              
  builder.setNegativeButton("Cancel", null);
  builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialog, int which) {
          Toast.makeText(SettingsActivityNew.this, "which: " + which, Toast.LENGTH_LONG).show();
      }
  });
  builder.show();
  </code></pre>
  
  <p>For some strange reason, the int which, keeps giving me -1. Why is this happening?</p>