title: Android. Date Picker (spinner) doesn't display properly
body: <p>I initialize my date picker as follows:</p>
  
  <pre><code>    if (question.getAnswers().size() &gt; 0) {
          EBotAnswer ans = question.getAnswers().get(0);
  
          try {
              if (ans.hasMinDate()) {
                  picker.setMinDate(ans.getMinDateInLocalDate().getTimeInMillis());
              }
          } catch (IllegalArgumentException e) {
          }
          try {
              if (ans.hasMaxDate()) {
                  picker.setMaxDate(ans.getMaxDateInLocalDate().getTimeInMillis());
              }
          } catch (IllegalArgumentException e) {
          }
  
          Calendar startWithDate = null;
          if (ans.hasStartWithDate()) {
              startWithDate = ans.getStartWithDateInLocalDate();
          } else if (ans.defaultCalendarDateMin()) {
              startWithDate = ans.getMinDateInLocalDate();
          } else if (ans.defaultCalendarDateMax()) {
              startWithDate = ans.getMaxDateInLocalDate();
          } else if (ans.defaultCalendarDateStartWith()) {//This is somewhat redundant
              startWithDate = ans.getStartWithDateInLocalDate();
          }
          if (startWithDate != null) {
              picker.updateDate(
                      startWithDate.get(Calendar.YEAR),
                      startWithDate.get(Calendar.MONTH),
                      startWithDate.get(Calendar.DAY_OF_MONTH));
          }
      }
  </code></pre>
  
  <p>But initially, the layout looks like so: </p>
  
  <p><a href="https://i.stack.imgur.com/tsSuI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tsSuI.png" alt="enter image description here"></a></p>
  
  <p>If I start turning the day spinner, the 8th of July shows up.
  <a href="https://i.stack.imgur.com/5s4om.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5s4om.png" alt="enter image description here"></a></p>
  
  <p>Any ideas on why this is happening ?!</p>
  
  <p>I tried calling <code>picker.invalidate()</code> or <code>picker.requestLayout()</code> or even <code>picker.requestFocus()</code> but nothing seems to be working.</p>