So the problem is very simple:
I have integrated a DatePicker
in my application.
Not as a DialogDatePicker
but as a View component (more pr
Set your android:targetSdkVersion
to be 11 or higher. Here is a sample application demonstrating this.
UPDATE
First, your original DatePicker
screenshot is from a dark theme (e.g., Theme.Holo
), whereas your second screenshot is from a light theme (e.g., Theme.Holo.Light
).
Second, the DatePicker
documentation has the following opening paragraph:
This class is a widget for selecting a date. The date can be selected by a year, month, and day spinners or a CalendarView. The set of spinners and the calendar view are automatically synchronized. The client can customize whether only the spinners, or only the calendar view, or both to be displayed. Also the minimal and maximal date from which dates to be selected can be customized.
You can get rid of the CalendarView
via android:calendarViewShown
(or setCalendarViewShown()
). When you try that, you will find that your year spinner will appear once the CalendarView
is gone.