title: Android 6.0 DatePickerDialog Theme
body: <p>Seems like anyone using Marshmallow (Android 6.0) is not able to use the <code>DatePicketDialog</code> within my app. There appears to be some sort of theme issue that I'm encountering. I use a <code>DialogFragment</code> which contains a <code>DatePicketDialog</code> for the user to select birthday. Here are shots of the DialogFragment with Android 5.x an d 6.x. </p>
  
  <p><a href="https://i.stack.imgur.com/uqG3F.png" rel="noreferrer"><img src="https://i.stack.imgur.com/uqG3F.png" alt="Android 5.x"></a>
  <a href="https://i.stack.imgur.com/tCWY2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tCWY2.png" alt="Android 6.x"></a></p>
  
  <p>I attempted to add a theme in the <code>DatePickerDialog</code> constructor, but that made the <code>DialogFragment</code> fullscreen and I don't want that. Does anyone know how I can get the <code>DatePickerDialog</code> to look like it was prior to Marshmallow?</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>Here is the code where I create the <code>DialogFragment</code>:</p>
  
  <pre><code>DialogFragment ageFragment = new DatePickerDialogFragment();
  ageFragment.show(getFragmentManager(), "datePicker");
  </code></pre>
  
  <p>Here is the <code>onCreateDialog</code> inside the <code>DatePickerDialogFragment</code>:</p>
  
  <pre><code>@Override
  public Dialog onCreateDialog(Bundle savedInstanceState) {
      // Use the current date as the default date in the picker if no filters are set
      Calendar cal = Calendar.getInstance();
      // Set the date 18 years previous, since only 18 and older are allowed on the app
      cal.add(Calendar.YEAR, -18);
      int year, month, day;
      if (iDialogListener.getYear() == -1 || iDialogListener.getMonth() == -1
              || iDialogListener.getDay() == -1) {
          Calendar defaultCal = Calendar.getInstance();
          // 40 is the default age to show
          defaultCal.add(Calendar.YEAR, -40);
          year = defaultCal.get(Calendar.YEAR);
          month = defaultCal.get(Calendar.MONTH);
          day = defaultCal.get(Calendar.DAY_OF_MONTH);
      } else {
          year = iDialogListener.getYear();
          month = iDialogListener.getMonth();
          day = iDialogListener.getDay();
      }
  
      DatePickerDialog datepicker = new DatePickerDialog(getActivity(), this, year, month, day);
      datepicker.getDatePicker().setMaxDate(cal.getTimeInMillis());
      Calendar minDate = Calendar.getInstance();
      minDate.set(Calendar.YEAR, Calendar.getInstance().get(Calendar.YEAR) - 100);
      datepicker.getDatePicker().setMinDate(minDate.getTimeInMillis());
  
      // Create a new instance of DatePickerDialog and return it
      return datepicker;
  }
  </code></pre>
  
  <p>In the themes.xml the only line that touches <code>Dialogs</code> is</p>
  
  <pre><code>&lt;item name="android:alertDialogTheme"&gt;@style/CustomDialogTheme&lt;/item&gt;
  </code></pre>
  
  <p>But if I'm thinking right, that doesn't touch the <code>DialogFragment</code> does it?</p>
  
  <p><strong>Update 2</strong></p>
  
  <p>Here is the <code>CustomDialogTheme</code>:</p>
  
  <pre><code>&lt;style name="CustomDialogTheme" parent="@android:style/Theme.Holo.Light.Dialog"&gt;
      &lt;item name="android:windowBackground"&gt;@android:color/transparent&lt;/item&gt;
      &lt;item name="android:windowContentOverlay"&gt;@null&lt;/item&gt;
      &lt;item name="android:windowMinWidthMajor"&gt;@android:dimen/dialog_min_width_major&lt;/item&gt;
      &lt;item name="android:windowMinWidthMinor"&gt;@android:dimen/dialog_min_width_minor&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>