title: Can't get Android DatePickerDialog to switch to Spinner mode
body: <p>I am building an app that uses a DatePickerDialog to allow the user to select their birthdate. Here's the code that loads the dialog right now:</p>
  
  <pre><code>private void selectBirthdate() {
      int year, month, day;
      if (mBirthDate == null) {
          year = DEF_YEAR;
          month = DEF_MON;
          day = DEF_DAY;
      }
      else {
          year = mBirthDate.get(Calendar.YEAR);
          month = mBirthDate.get(Calendar.MONTH);
          day = mBirthDate.get(Calendar.DAY_OF_MONTH);
      }
      new DatePickerDialog(
              getActivity(),
              new DatePickerDialog.OnDateSetListener() {
                  @Override
                  public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
                      mBirthDate = new GregorianCalendar();
                      mBirthDate.set(Calendar.YEAR, year);
                      mBirthDate.set(Calendar.MONTH, month);
                      mBirthDate.set(Calendar.DAY_OF_MONTH, dayOfMonth);
                      if (mTxtBirthDate != null) {
                          mTxtBirthDate.setText(mBirthDateFormat.format(mBirthDate.getTime()));
                      }
                  }
              },
              year,
              month,
              day
      ).show();
  }
  </code></pre>
  
  <p>And here's what the dialog looks like when I load it:
  <a href="https://i.stack.imgur.com/30TP3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/30TP3.png" alt="Original Dialog"></a></p>
  
  <p>However, they want to be able to use the old-style spinner DatePicker, because in the new Calendar view, it's not always obvious to the user that they can change the year. So I have been studying up on the topic, and according to what I have read, it should be possible to use themes to force the DatePickerDialog into Spinner mode. So here's what I've done.</p>
  
  <p>First, I added the following to my styles.xml:
  <a href="https://i.stack.imgur.com/z8GtN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/z8GtN.png" alt="Style XML"></a></p>
  
  <p>(Sorry for the screenshot. Apparently SO's parser can't handle XML.)</p>
  
  <p>Then, I update the DatePickerDialog constructor to use my new style:</p>
  
  <pre><code>new DatePickerDialog(
          getActivity(),
          R.style.MyDialogTheme,
          new DatePickerDialog.OnDateSetListener() {
              @Override
              public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
                  mBirthDate = new GregorianCalendar();
                  mBirthDate.set(Calendar.YEAR, year);
                  mBirthDate.set(Calendar.MONTH, month);
                  mBirthDate.set(Calendar.DAY_OF_MONTH, dayOfMonth);
                  if (mTxtBirthDate != null) {
                      mTxtBirthDate.setText(mBirthDateFormat.format(mBirthDate.getTime()));
                  }
              }
          },
          year,
          month,
          day
  ).show();
  </code></pre>
  
  <p>Now, when I load the dialog it looks like this:
  <a href="https://i.stack.imgur.com/senqB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/senqB.png" alt="New Dialog"></a></p>
  
  <p>Clearly something has changed; the dialog has a darker theme. But it's not doing what I want. It's still displaying the calendar view instead of the spinner view. Any idea what I might have missed?</p>