title: onBackPressed() does not work
body: <p>I'm showing up a Dialog on app-start, where you have to select a config. Since it is essential to select one config, I want to "disable" the back-button via a empty <code>onBackPressed()</code>.</p>
  
  <p>I got the following code in a <code>DialogFragment</code>:</p>
  
  <pre><code> public class ChangeConfigDialogFragment extends DialogFragment {
  
      public Dialog onCreateDialog(Bundle savedInstanceState) {
          // Use the Builder class for convenient dialog construction
          AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
          builder.setTitle(R.string.dialog_config_change)
                  .setItems(R.array.config_array,
                          new DialogInterface.OnClickListener() {
                              public void onClick(DialogInterface dialog,
                                      int which) {
                                  // The 'which' argument contains the index
                                  // position
                                  // of the selected item
                                  if (which == 0){
                                      Initiation.BAUDRATE = 500;
                                      Toast.makeText(getActivity(), "Baudrate at " + Initiation.BAUDRATE, Toast.LENGTH_LONG).show();
                                      if (Initiation.getADK() == null){
                                          Initiation.initiateCAN();
                                      }
                                  } else if (which == 1) {
                                      Initiation.BAUDRATE = 600;
                                      Toast.makeText(getActivity(), "Baudrate at " + Initiation.BAUDRATE, Toast.LENGTH_LONG).show();
                                      if (Initiation.getADK() == null){
                                          Initiation.initiateCAN();
                                      }
                                  } else if (which == 2) {
                                      Initiation.BAUDRATE = 700;
                                      Toast.makeText(getActivity(), "Baudrate at " + Initiation.BAUDRATE, Toast.LENGTH_LONG).show();
                                      if (Initiation.getADK() == null){
                                          Initiation.initiateCAN();
                                      }
                                  }
  
                              }
  
                          });
          // Create the AlertDialog object and return it
          return builder.create();
      }
  
      public void onBackPressed(){
          Log.d(getTag(), "are you there?");
  
      }
  }
  </code></pre>
  
  <p>The problem is, that the <code>onBackPressed()</code> is never been called. Even the log message does not appear.</p>
  
  <p>I tried to clean the project, but no success. Also tried to use a onKeyDown-method from some other topics here on SO. Does anyone has a clue how to solve this?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>It works now. <code>.setCancelable(false);</code> worked, but I was to stupid to add it to the <code>Dialog</code> from which the <code>Fragment</code> was called. (instead added it to the <code>builder</code></p>
  
  <p>Thanks for all your help and time.</p>