title: DatePickerDialog inside ShowDIalog() deprecated
body: <p>I have next code:</p>
  
  <pre><code>dateDisplay1.setOnClickListener(new OnClickListener() {
  @SuppressWarnings("deprecation")
      public void onClick(View v) {
          option = 1;
          showDialog(DATE_DIALOG_ID);
      }
  });
  </code></pre>
  
  <p>And the onCreateDialog function:</p>
  
  <pre><code>protected Dialog onCreateDialog(int id) {
  
      Calendar cal = Calendar.getInstance();
  
      switch (id) {
      case DATE_DIALOG_ID:
          return new DatePickerDialog(this, dayDate, cal.get(Calendar.YEAR),      cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH));
      case TIME_DIALOG_ID:
          return new TimePickerDialog(this, timeDate, cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), false);
      }
      return null;
  }
  </code></pre>
  
  <p>What I am trying to do is to adapt the showDialog(), that is deprecated, to a DialogFragment, with no success. The code below works but it is not best practices. So I would like to correct the code.</p>
  
  <p>How woould you implement that?</p>