title: How to set Positive / Negative Button in DialogFragment?
body: <p>The solution was the onCreatDialog.
  The other issue about crashed was caused by a LinearLayout parent in my listView xml</p>
  
  <p>Here my code [EDITED]:</p>
  
  <pre><code>public class MyDialogFragment extends DialogFragment {
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
          View mView = inflater.inflate(R.layout.fragment_dialog, null);
          ListView mListView = (ListView) mView.findViewById(R.id.lvListe);
  
          String[] mValues = {"Orientation", "Nombre de Chambres", "Nombre de Salle de bains", "Nombre de toilettes", "Cave", "Parking", "Garage", "Jardin"};
  
          getDialog().setTitle("Autres Critères");
  
          mListView.setAdapter(new ArrayAdapter&lt;String&gt;(getActivity(), android.R.layout.simple_list_item_1, mValues));
  
          return mView;
      }
  
      @Override
      public Dialog onCreateDialog(Bundle savedInstanceState) {
  
          return new AlertDialog.Builder(getActivity())
                  .setPositiveButton("ok",
                          new DialogInterface.OnClickListener() {
                              public void onClick(DialogInterface dialog, int whichButton) {
                                  }
                          }
                  )
                  .setNegativeButton("Cancel",
                          new DialogInterface.OnClickListener() {
                              public void onClick(DialogInterface dialog, int whichButton) {
                                  onCancel(dialog);
                              }
                          }
                  )
                  .create();
      }
  
  }
  </code></pre>
  
  <p>Thanks in advance :)</p>