title: Create new android material datepicker on fragmentdialog
body: <p>Hello guys on my application I was using the material theme v 1.0.0 now I have switched to the version 1.2.0 and I have seen that there is a new datepicker.</p>
  
  <p>I am trying to modify my fragment dialog using the new datepicker but without success.</p>
  
  <p>This is my current code in <code>onCreateDialog()</code> in <code>public static class DatePickerFragment extends DialogFragmentimplements DatePickerDialog.OnDateSetListener</code>:</p>
  
  <pre><code>DatePickerDialog dialogDatePicker = new DatePickerDialog(Objects.requireNonNull(getActivity()),this, year - 40, month, day);
  Calendar c = Calendar.getInstance(TimeZone.getDefault());
  c.set(1861, 2, 17);
  dialogDatePicker.getDatePicker().setMinDate(c.getTimeInMillis());
  dialogDatePicker.getDatePicker().getTouchables().get( 0 ).performClick(); //show year before date
  return dialogDatePicker; 
  </code></pre>
  
  <p>with this code I get this dialog:</p>
  
  <p><a href="https://i.stack.imgur.com/623o8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/623o8.png" alt="enter image description here"></a></p>
  
  <p>But now I would like to get this new datepicker always starting from the selection of the year:
  <a href="https://i.stack.imgur.com/ECFnL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ECFnL.png" alt="enter image description here"></a></p>
  
  <p>I saw that it refers to MaterialDatePicker.Builder but I can't integrate it into the DialogFragment oncreate.
  Do you have any idea how to do it?</p>